octokit 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octokit/authentication.rb +4 -4
- data/lib/octokit/client.rb +70 -5
- data/lib/octokit/client/authorizations.rb +123 -29
- data/lib/octokit/client/commit_comments.rb +7 -7
- data/lib/octokit/client/commits.rb +11 -11
- data/lib/octokit/client/contents.rb +7 -7
- data/lib/octokit/client/deployments.rb +5 -5
- data/lib/octokit/client/downloads.rb +5 -5
- data/lib/octokit/client/emojis.rb +1 -1
- data/lib/octokit/client/events.rb +15 -15
- data/lib/octokit/client/feeds.rb +2 -2
- data/lib/octokit/client/gists.rb +17 -17
- data/lib/octokit/client/gitignore.rb +3 -3
- data/lib/octokit/client/hooks.rb +1 -1
- data/lib/octokit/client/issues.rb +16 -16
- data/lib/octokit/client/labels.rb +14 -14
- data/lib/octokit/client/legacy_search.rb +3 -3
- data/lib/octokit/client/markdown.rb +2 -2
- data/lib/octokit/client/meta.rb +2 -2
- data/lib/octokit/client/milestones.rb +6 -6
- data/lib/octokit/client/notifications.rb +10 -10
- data/lib/octokit/client/objects.rb +8 -8
- data/lib/octokit/client/organizations.rb +30 -30
- data/lib/octokit/client/pages.rb +4 -4
- data/lib/octokit/client/pub_sub_hubbub.rb +5 -5
- data/lib/octokit/client/pull_requests.rb +20 -20
- data/lib/octokit/client/rate_limit.rb +5 -5
- data/lib/octokit/client/refs.rb +9 -9
- data/lib/octokit/client/releases.rb +11 -11
- data/lib/octokit/client/repositories.rb +44 -44
- data/lib/octokit/client/search.rb +5 -5
- data/lib/octokit/client/stats.rb +6 -6
- data/lib/octokit/client/statuses.rb +3 -3
- data/lib/octokit/client/users.rb +36 -36
- data/lib/octokit/configurable.rb +4 -4
- data/lib/octokit/error.rb +4 -0
- data/lib/octokit/rate_limit.rb +1 -1
- data/lib/octokit/version.rb +1 -1
- metadata +9 -9
@@ -5,7 +5,7 @@ module Octokit
|
|
5
5
|
|
6
6
|
# Methods for the Repo Contents API
|
7
7
|
#
|
8
|
-
# @see
|
8
|
+
# @see https://developer.github.com/v3/repos/contents/
|
9
9
|
module Contents
|
10
10
|
|
11
11
|
# Receive the default Readme for a repository
|
@@ -13,7 +13,7 @@ module Octokit
|
|
13
13
|
# @param repo [String, Repository, Hash] A GitHub repository
|
14
14
|
# @option options [String] :ref name of the Commit/Branch/Tag. Defaults to “master”.
|
15
15
|
# @return [Sawyer::Resource] The detail of the readme
|
16
|
-
# @see
|
16
|
+
# @see https://developer.github.com/v3/repos/contents/#get-the-readme
|
17
17
|
# @example Get the readme file for a repo
|
18
18
|
# Octokit.readme("octokit/octokit.rb")
|
19
19
|
def readme(repo, options={})
|
@@ -26,7 +26,7 @@ module Octokit
|
|
26
26
|
# @option options [String] :path A folder or file path
|
27
27
|
# @option options [String] :ref name of the Commit/Branch/Tag. Defaults to “master”.
|
28
28
|
# @return [Sawyer::Resource] The contents of a file or list of the files in the folder
|
29
|
-
# @see
|
29
|
+
# @see https://developer.github.com/v3/repos/contents/#get-contents
|
30
30
|
# @example List the contents of lib/octokit.rb
|
31
31
|
# Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb')
|
32
32
|
def contents(repo, options={})
|
@@ -46,7 +46,7 @@ module Octokit
|
|
46
46
|
# @option options [String] :branch The branch on which to add the content
|
47
47
|
# @option options [String] :file Path or Ruby File object for content
|
48
48
|
# @return [Sawyer::Resource] The contents and commit info for the addition
|
49
|
-
# @see
|
49
|
+
# @see https://developer.github.com/v3/repos/contents/#create-a-file
|
50
50
|
# @example Add content at lib/octokit.rb
|
51
51
|
# Octokit.create_contents("octokit/octokit.rb",
|
52
52
|
# "lib/octokit.rb",
|
@@ -95,7 +95,7 @@ module Octokit
|
|
95
95
|
# @option options [String] :branch The branch on which to update the content
|
96
96
|
# @option options [String] :file Path or Ruby File object for content
|
97
97
|
# @return [Sawyer::Resource] The contents and commit info for the update
|
98
|
-
# @see
|
98
|
+
# @see https://developer.github.com/v3/repos/contents/#update-a-file
|
99
99
|
# @example Update content at lib/octokit.rb
|
100
100
|
# Octokit.update_contents("octokit/octokit.rb",
|
101
101
|
# "lib/octokit.rb",
|
@@ -123,7 +123,7 @@ module Octokit
|
|
123
123
|
# @param sha [String] The _blob sha_ of the content to delete
|
124
124
|
# @option options [String] :branch The branch on which to delete the content
|
125
125
|
# @return [Sawyer::Resource] The commit info for the delete
|
126
|
-
# @see
|
126
|
+
# @see https://developer.github.com/v3/repos/contents/#delete-a-file
|
127
127
|
# @example Delete content at lib/octokit.rb
|
128
128
|
# Octokit.delete_contents("octokit/octokit.rb",
|
129
129
|
# "lib/octokit.rb",
|
@@ -146,7 +146,7 @@ module Octokit
|
|
146
146
|
# @option options format [String] Either tarball (default) or zipball.
|
147
147
|
# @option options [String] :ref Optional valid Git reference, defaults to master.
|
148
148
|
# @return [String] Location of the download
|
149
|
-
# @see
|
149
|
+
# @see https://developer.github.com/v3/repos/contents/#get-archive-link
|
150
150
|
# @example Get archive link for octokit/octokit.rb
|
151
151
|
# Octokit.archive_link("octokit/octokit.rb")
|
152
152
|
def archive_link(repo, options={})
|
@@ -3,7 +3,7 @@ module Octokit
|
|
3
3
|
|
4
4
|
# Methods for the Deployments API
|
5
5
|
#
|
6
|
-
# @see
|
6
|
+
# @see https://developer.github.com/v3/repos/commits/deployments/
|
7
7
|
module Deployments
|
8
8
|
|
9
9
|
DEPLOYMENTS_PREVIEW_MEDIA_TYPE = "application/vnd.github.cannonball-preview+json".freeze
|
@@ -12,7 +12,7 @@ module Octokit
|
|
12
12
|
#
|
13
13
|
# @param repo [String, Repository, Hash] A GitHub repository
|
14
14
|
# @return [Array<Sawyer::Resource>] A list of deployments
|
15
|
-
# @see
|
15
|
+
# @see https://developer.github.com/v3/repos/deployments/#list-deployments
|
16
16
|
def deployments(repo, options = {})
|
17
17
|
options = ensure_deployments_api_media_type(options)
|
18
18
|
get("repos/#{Repository.new(repo)}/deployments", options)
|
@@ -28,7 +28,7 @@ module Octokit
|
|
28
28
|
# @option options [String] :auto_merge Optional parameter to merge the default branch into the requested deployment branch if necessary. Default: false
|
29
29
|
# @option options [String] :description Optional short description.
|
30
30
|
# @return [Sawyer::Resource] A deployment
|
31
|
-
# @see
|
31
|
+
# @see https://developer.github.com/v3/repos/deployments/#create-a-deployment
|
32
32
|
def create_deployment(repo, ref, options = {})
|
33
33
|
options = ensure_deployments_api_media_type(options)
|
34
34
|
options[:ref] = ref
|
@@ -39,7 +39,7 @@ module Octokit
|
|
39
39
|
#
|
40
40
|
# @param deployment_url [String] A URL for a deployment resource
|
41
41
|
# @return [Array<Sawyer::Resource>] A list of deployment statuses
|
42
|
-
# @see
|
42
|
+
# @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses
|
43
43
|
def deployment_statuses(deployment_url, options = {})
|
44
44
|
options = ensure_deployments_api_media_type(options)
|
45
45
|
deployment = get(deployment_url, :accept => options[:accept])
|
@@ -52,7 +52,7 @@ module Octokit
|
|
52
52
|
# @param deployment_url [String] A URL for a deployment resource
|
53
53
|
# @param state [String] The state: pending, success, failure, error
|
54
54
|
# @return [Sawyer::Resource] A deployment status
|
55
|
-
# @see
|
55
|
+
# @see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status
|
56
56
|
def create_deployment_status(deployment_url, state, options = {})
|
57
57
|
options = ensure_deployments_api_media_type(options)
|
58
58
|
deployment = get(deployment_url, :accept => options[:accept])
|
@@ -3,7 +3,7 @@ module Octokit
|
|
3
3
|
|
4
4
|
# Methods for the Repo Downloads API
|
5
5
|
#
|
6
|
-
# @see
|
6
|
+
# @see https://developer.github.com/v3/repos/downloads/
|
7
7
|
module Downloads
|
8
8
|
|
9
9
|
# List available downloads for a repository
|
@@ -11,11 +11,11 @@ module Octokit
|
|
11
11
|
# @param repo [String, Repository, Hash] A Github Repository
|
12
12
|
# @return [Array] A list of available downloads
|
13
13
|
# @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads
|
14
|
-
# @see
|
14
|
+
# @see https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository
|
15
15
|
# @example List all downloads for Github/Hubot
|
16
16
|
# Octokit.downloads("github/hubot")
|
17
17
|
def downloads(repo, options={})
|
18
|
-
|
18
|
+
paginate "repos/#{Repository.new(repo)}/downloads", options
|
19
19
|
end
|
20
20
|
alias :list_downloads :downloads
|
21
21
|
|
@@ -25,7 +25,7 @@ module Octokit
|
|
25
25
|
# @param id [Integer] ID of the download
|
26
26
|
# @return [Sawyer::Resource] A single download from the repository
|
27
27
|
# @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads
|
28
|
-
# @see
|
28
|
+
# @see https://developer.github.com/v3/repos/downloads/#get-a-single-download
|
29
29
|
# @example Get the "Robawt" download from Github/Hubot
|
30
30
|
# Octokit.download("github/hubot")
|
31
31
|
def download(repo, id, options={})
|
@@ -37,7 +37,7 @@ module Octokit
|
|
37
37
|
# @param repo [String, Repository, Hash] A GitHub repository
|
38
38
|
# @param id [Integer] ID of the download
|
39
39
|
# @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads
|
40
|
-
# @see
|
40
|
+
# @see https://developer.github.com/v3/repos/downloads/#delete-a-download
|
41
41
|
# @return [Boolean] Status
|
42
42
|
# @example Get the "Robawt" download from Github/Hubot
|
43
43
|
# Octokit.delete_download("github/hubot", 1234)
|
@@ -7,7 +7,7 @@ module Octokit
|
|
7
7
|
# List all emojis used on GitHub
|
8
8
|
#
|
9
9
|
# @return [Sawyer::Resource] A list of all emojis on GitHub
|
10
|
-
# @see
|
10
|
+
# @see https://developer.github.com/v3/emojis/#emojis
|
11
11
|
# @example List all emojis
|
12
12
|
# Octokit.emojis
|
13
13
|
def emojis(options = {})
|
@@ -3,14 +3,14 @@ module Octokit
|
|
3
3
|
|
4
4
|
# Method for the Events API
|
5
5
|
#
|
6
|
-
# @see
|
7
|
-
# @see
|
6
|
+
# @see https://developer.github.com/v3/activity/events/
|
7
|
+
# @see https://developer.github.com/v3/issues/events/
|
8
8
|
module Events
|
9
9
|
|
10
10
|
# List all public events for GitHub
|
11
11
|
#
|
12
12
|
# @return [Array<Sawyer::Resource>] A list of all public events from GitHub
|
13
|
-
# @see
|
13
|
+
# @see https://developer.github.com/v3/activity/events/#list-public-events
|
14
14
|
# @example List all pubilc events
|
15
15
|
# Octokit.public_events
|
16
16
|
def public_events(options = {})
|
@@ -20,7 +20,7 @@ module Octokit
|
|
20
20
|
# List all user events
|
21
21
|
#
|
22
22
|
# @return [Array<Sawyer::Resource>] A list of all user events
|
23
|
-
# @see
|
23
|
+
# @see https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
|
24
24
|
# @example List all user events
|
25
25
|
# Octokit.user_events("sferik")
|
26
26
|
def user_events(user, options = {})
|
@@ -31,7 +31,7 @@ module Octokit
|
|
31
31
|
#
|
32
32
|
# @param user [String] GitHub username
|
33
33
|
# @return [Array<Sawyer::Resource>] A list of public user events
|
34
|
-
# @see
|
34
|
+
# @see https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user
|
35
35
|
# @example List public user events
|
36
36
|
# Octokit.user_events("sferik")
|
37
37
|
def user_public_events(user, options = {})
|
@@ -41,7 +41,7 @@ module Octokit
|
|
41
41
|
# List events that a user has received
|
42
42
|
#
|
43
43
|
# @return [Array<Sawyer::Resource>] A list of all user received events
|
44
|
-
# @see
|
44
|
+
# @see https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
|
45
45
|
# @example List all user received events
|
46
46
|
# Octokit.received_events("sferik")
|
47
47
|
def received_events(user, options = {})
|
@@ -51,7 +51,7 @@ module Octokit
|
|
51
51
|
# List public events a user has received
|
52
52
|
#
|
53
53
|
# @return [Array<Sawyer::Resource>] A list of public user received events
|
54
|
-
# @see
|
54
|
+
# @see https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received
|
55
55
|
# @example List public user received events
|
56
56
|
# Octokit.received_public_events("sferik")
|
57
57
|
def received_public_events(user, options = {})
|
@@ -62,7 +62,7 @@ module Octokit
|
|
62
62
|
#
|
63
63
|
# @param repo [String, Repository, Hash] A GitHub repository
|
64
64
|
# @return [Array<Sawyer::Resource>] A list of events for a repository
|
65
|
-
# @see
|
65
|
+
# @see https://developer.github.com/v3/activity/events/#list-repository-events
|
66
66
|
# @example List events for a repository
|
67
67
|
# Octokit.repository_events("sferik/rails_admin")
|
68
68
|
def repository_events(repo, options = {})
|
@@ -73,7 +73,7 @@ module Octokit
|
|
73
73
|
#
|
74
74
|
# @param repo [String, Repository, Hash] A GitHub repository
|
75
75
|
# @return [Array<Sawyer::Resource>] A list of events for a repository's network
|
76
|
-
# @see
|
76
|
+
# @see https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
|
77
77
|
# @example List events for a repository's network
|
78
78
|
# Octokit.repository_network_events("sferik/rails_admin")
|
79
79
|
def repository_network_events(repo, options = {})
|
@@ -86,7 +86,7 @@ module Octokit
|
|
86
86
|
#
|
87
87
|
# @param org [String] Organization GitHub handle
|
88
88
|
# @return [Array<Sawyer::Resource>] List of all events from a GitHub organization
|
89
|
-
# @see
|
89
|
+
# @see https://developer.github.com/v3/activity/events/#list-events-for-an-organization
|
90
90
|
# @example List events for the lostisland organization
|
91
91
|
# @client.organization_events("lostisland")
|
92
92
|
def organization_events(org, options = {})
|
@@ -97,7 +97,7 @@ module Octokit
|
|
97
97
|
#
|
98
98
|
# @param org [String] Organization GitHub username
|
99
99
|
# @return [Array<Sawyer::Resource>] List of public events from a GitHub organization
|
100
|
-
# @see
|
100
|
+
# @see https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
|
101
101
|
# @example List public events for GitHub
|
102
102
|
# Octokit.organization_public_events("GitHub")
|
103
103
|
def organization_public_events(org, options = {})
|
@@ -109,8 +109,8 @@ module Octokit
|
|
109
109
|
# @param repo [String, Repository, Hash] A GitHub repository
|
110
110
|
#
|
111
111
|
# @return [Array<Sawyer::Resource>] Array of all Issue Events for this Repository
|
112
|
-
# @see
|
113
|
-
# @see
|
112
|
+
# @see https://developer.github.com/v3/issues/events/#list-events-for-a-repository
|
113
|
+
# @see https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
|
114
114
|
# @example Get all Issue Events for Octokit
|
115
115
|
# Octokit.repository_issue_events("octokit/octokit.rb")
|
116
116
|
def repository_issue_events(repo, options = {})
|
@@ -124,7 +124,7 @@ module Octokit
|
|
124
124
|
# @param number [Integer] Issue number
|
125
125
|
#
|
126
126
|
# @return [Array<Sawyer::Resource>] Array of events for that issue
|
127
|
-
# @see
|
127
|
+
# @see https://developer.github.com/v3/issues/events/#list-events-for-an-issue
|
128
128
|
# @example List all issues events for issue #38 on octokit/octokit.rb
|
129
129
|
# Octokit.issue_events("octokit/octokit.rb", 38)
|
130
130
|
def issue_events(repo, number, options = {})
|
@@ -137,7 +137,7 @@ module Octokit
|
|
137
137
|
# @param number [Integer] Event number
|
138
138
|
#
|
139
139
|
# @return [Sawyer::Resource] A single Event for an Issue
|
140
|
-
# @see
|
140
|
+
# @see https://developer.github.com/v3/issues/events/#get-a-single-event
|
141
141
|
# @example Get Event information for ID 3094334 (a pull request was closed)
|
142
142
|
# Octokit.issue_event("octokit/octokit.rb", 3094334)
|
143
143
|
def issue_event(repo, number, options = {})
|
data/lib/octokit/client/feeds.rb
CHANGED
@@ -3,7 +3,7 @@ module Octokit
|
|
3
3
|
|
4
4
|
# Methods for the Feeds API
|
5
5
|
#
|
6
|
-
# @see
|
6
|
+
# @see https://developer.github.com/v3/activity/feeds/
|
7
7
|
module Feeds
|
8
8
|
|
9
9
|
# List Feeds
|
@@ -12,7 +12,7 @@ module Octokit
|
|
12
12
|
# for more information.
|
13
13
|
#
|
14
14
|
# @return [Array<Sawyer::Resource>] list of feeds
|
15
|
-
# @see
|
15
|
+
# @see https://developer.github.com/v3/activity/feeds/#list-feeds
|
16
16
|
def feeds
|
17
17
|
get "feeds"
|
18
18
|
end
|
data/lib/octokit/client/gists.rb
CHANGED
@@ -3,7 +3,7 @@ module Octokit
|
|
3
3
|
|
4
4
|
# Methods for the Gists API
|
5
5
|
#
|
6
|
-
# @see
|
6
|
+
# @see https://developer.github.com/v3/gists/
|
7
7
|
module Gists
|
8
8
|
|
9
9
|
# List gists for a user or all public gists
|
@@ -14,7 +14,7 @@ module Octokit
|
|
14
14
|
# Octokit.gists('defunkt')
|
15
15
|
# @example Fetch all public gists
|
16
16
|
# Octokit.gists
|
17
|
-
# @see
|
17
|
+
# @see https://developer.github.com/v3/gists/#list-gists
|
18
18
|
def gists(username=nil, options = {})
|
19
19
|
if username.nil?
|
20
20
|
paginate 'gists', options
|
@@ -29,7 +29,7 @@ module Octokit
|
|
29
29
|
# @return [Array<Sawyer::Resource>] A list of gists
|
30
30
|
# @example Fetch all public gists
|
31
31
|
# Octokit.public_gists
|
32
|
-
# @see
|
32
|
+
# @see https://developer.github.com/v3/gists/#list-gists
|
33
33
|
def public_gists(options = {})
|
34
34
|
paginate 'gists/public', options
|
35
35
|
end
|
@@ -37,7 +37,7 @@ module Octokit
|
|
37
37
|
# List the authenticated user’s starred gists
|
38
38
|
#
|
39
39
|
# @return [Array<Sawyer::Resource>] A list of gists
|
40
|
-
# @see
|
40
|
+
# @see https://developer.github.com/v3/gists/#list-gists
|
41
41
|
def starred_gists(options = {})
|
42
42
|
paginate 'gists/starred', options
|
43
43
|
end
|
@@ -46,7 +46,7 @@ module Octokit
|
|
46
46
|
#
|
47
47
|
# @param gist [String] ID of gist to fetch
|
48
48
|
# @return [Sawyer::Resource] Gist information
|
49
|
-
# @see
|
49
|
+
# @see https://developer.github.com/v3/gists/#get-a-single-gist
|
50
50
|
def gist(gist, options = {})
|
51
51
|
get "gists/#{Gist.new(gist)}", options
|
52
52
|
end
|
@@ -60,7 +60,7 @@ module Octokit
|
|
60
60
|
# should be the filename, the value a Hash with a :content key with text
|
61
61
|
# content of the Gist.
|
62
62
|
# @return [Sawyer::Resource] Newly created gist info
|
63
|
-
# @see
|
63
|
+
# @see https://developer.github.com/v3/gists/#create-a-gist
|
64
64
|
def create_gist(options = {})
|
65
65
|
post 'gists', options
|
66
66
|
end
|
@@ -79,7 +79,7 @@ module Octokit
|
|
79
79
|
# can be performed by including the filename with a null hash.
|
80
80
|
# @return
|
81
81
|
# [Sawyer::Resource] Newly created gist info
|
82
|
-
# @see
|
82
|
+
# @see https://developer.github.com/v3/gists/#edit-a-gist
|
83
83
|
# @example Update a gist
|
84
84
|
# @client.edit_gist('some_id', {
|
85
85
|
# :files => {"boo.md" => {"content" => "updated stuff"}}
|
@@ -93,7 +93,7 @@ module Octokit
|
|
93
93
|
#
|
94
94
|
# @param gist [String] Gist ID
|
95
95
|
# @return [Boolean] Indicates if gist is starred successfully
|
96
|
-
# @see
|
96
|
+
# @see https://developer.github.com/v3/gists/#star-a-gist
|
97
97
|
def star_gist(gist, options = {})
|
98
98
|
boolean_from_response :put, "gists/#{Gist.new(gist)}/star", options
|
99
99
|
end
|
@@ -102,7 +102,7 @@ module Octokit
|
|
102
102
|
#
|
103
103
|
# @param gist [String] Gist ID
|
104
104
|
# @return [Boolean] Indicates if gist is unstarred successfully
|
105
|
-
# @see
|
105
|
+
# @see https://developer.github.com/v3/gists/#unstar-a-gist
|
106
106
|
def unstar_gist(gist, options = {})
|
107
107
|
boolean_from_response :delete, "gists/#{Gist.new(gist)}/star", options
|
108
108
|
end
|
@@ -111,7 +111,7 @@ module Octokit
|
|
111
111
|
#
|
112
112
|
# @param gist [String] Gist ID
|
113
113
|
# @return [Boolean] Indicates if gist is starred
|
114
|
-
# @see
|
114
|
+
# @see https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
|
115
115
|
def gist_starred?(gist, options = {})
|
116
116
|
boolean_from_response :get, "gists/#{Gist.new(gist)}/star", options
|
117
117
|
end
|
@@ -120,7 +120,7 @@ module Octokit
|
|
120
120
|
#
|
121
121
|
# @param gist [String] Gist ID
|
122
122
|
# @return [Sawyer::Resource] Data for the new gist
|
123
|
-
# @see
|
123
|
+
# @see https://developer.github.com/v3/gists/#fork-a-gist
|
124
124
|
def fork_gist(gist, options = {})
|
125
125
|
post "gists/#{Gist.new(gist)}/forks", options
|
126
126
|
end
|
@@ -129,7 +129,7 @@ module Octokit
|
|
129
129
|
#
|
130
130
|
# @param gist [String] Gist ID
|
131
131
|
# @return [Boolean] Indicating success of deletion
|
132
|
-
# @see
|
132
|
+
# @see https://developer.github.com/v3/gists/#delete-a-gist
|
133
133
|
def delete_gist(gist, options = {})
|
134
134
|
boolean_from_response :delete, "gists/#{Gist.new(gist)}", options
|
135
135
|
end
|
@@ -138,7 +138,7 @@ module Octokit
|
|
138
138
|
#
|
139
139
|
# @param gist_id [String] Gist Id.
|
140
140
|
# @return [Array<Sawyer::Resource>] Array of hashes representing comments.
|
141
|
-
# @see
|
141
|
+
# @see https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
|
142
142
|
# @example
|
143
143
|
# Octokit.gist_comments('3528ae645')
|
144
144
|
def gist_comments(gist_id, options = {})
|
@@ -150,7 +150,7 @@ module Octokit
|
|
150
150
|
# @param gist_id [String] Id of the gist.
|
151
151
|
# @param gist_comment_id [Integer] Id of the gist comment.
|
152
152
|
# @return [Sawyer::Resource] Hash representing gist comment.
|
153
|
-
# @see
|
153
|
+
# @see https://developer.github.com/v3/gists/comments/#get-a-single-comment
|
154
154
|
# @example
|
155
155
|
# Octokit.gist_comment('208sdaz3', 1451398)
|
156
156
|
def gist_comment(gist_id, gist_comment_id, options = {})
|
@@ -164,7 +164,7 @@ module Octokit
|
|
164
164
|
# @param gist_id [String] Id of the gist.
|
165
165
|
# @param comment [String] Comment contents.
|
166
166
|
# @return [Sawyer::Resource] Hash representing the new comment.
|
167
|
-
# @see
|
167
|
+
# @see https://developer.github.com/v3/gists/comments/#create-a-comment
|
168
168
|
# @example
|
169
169
|
# @client.create_gist_comment('3528645', 'This is very helpful.')
|
170
170
|
def create_gist_comment(gist_id, comment, options = {})
|
@@ -180,7 +180,7 @@ module Octokit
|
|
180
180
|
# @param gist_comment_id [Integer] Id of the gist comment to update.
|
181
181
|
# @param comment [String] Updated comment contents.
|
182
182
|
# @return [Sawyer::Resource] Hash representing the updated comment.
|
183
|
-
# @see
|
183
|
+
# @see https://developer.github.com/v3/gists/comments/#edit-a-comment
|
184
184
|
# @example
|
185
185
|
# @client.update_gist_comment('208sdaz3', '3528645', ':heart:')
|
186
186
|
def update_gist_comment(gist_id, gist_comment_id, comment, options = {})
|
@@ -195,7 +195,7 @@ module Octokit
|
|
195
195
|
# @param gist_id [String] Id of the gist.
|
196
196
|
# @param gist_comment_id [Integer] Id of the gist comment to delete.
|
197
197
|
# @return [Boolean] True if comment deleted, false otherwise.
|
198
|
-
# @see
|
198
|
+
# @see https://developer.github.com/v3/gists/comments/#delete-a-comment
|
199
199
|
# @example
|
200
200
|
# @client.delete_gist_comment('208sdaz3', '586399')
|
201
201
|
def delete_gist_comment(gist_id, gist_comment_id, options = {})
|
@@ -3,14 +3,14 @@ module Octokit
|
|
3
3
|
|
4
4
|
# Methods for the Gitignore API
|
5
5
|
#
|
6
|
-
# @see
|
6
|
+
# @see https://developer.github.com/v3/gitignore/
|
7
7
|
module Gitignore
|
8
8
|
|
9
9
|
# Listing available gitignore templates.
|
10
10
|
#
|
11
11
|
# These templates can be passed option when creating a repository.
|
12
12
|
#
|
13
|
-
# @see
|
13
|
+
# @see https://developer.github.com/v3/gitignore/#listing-available-templates
|
14
14
|
#
|
15
15
|
# @return [Array<String>] List of templates.
|
16
16
|
#
|
@@ -29,7 +29,7 @@ module Octokit
|
|
29
29
|
# case sensitive, make sure to use a valid name from the
|
30
30
|
# .gitignore_templates list.
|
31
31
|
#
|
32
|
-
# @see
|
32
|
+
# @see https://developer.github.com/v3/gitignore/#get-a-single-template
|
33
33
|
#
|
34
34
|
# @return [Sawyer::Resource] Gitignore template
|
35
35
|
#
|