Skip to content

Commit 74866c5

Browse files
committed
Merge pull request octokit#241 from mikedeboer/docUrls
Auto-generate documentation URLs by parsing them from a fresh grab of th...
2 parents 29dedb3 + a9618c7 commit 74866c5

File tree

14 files changed

+466
-158
lines changed

14 files changed

+466
-158
lines changed

api/v3.0.0/authorization.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ var authorization = module.exports = {
2929
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
3030
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
3131
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
32+
*
33+
* https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations
3234
**/
3335
this.getAll = function(msg, block, callback) {
3436
var self = this;
@@ -74,6 +76,8 @@ var authorization = module.exports = {
7476
*
7577
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
7678
* - id (String): Required.
79+
*
80+
* https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization
7781
**/
7882
this.get = function(msg, block, callback) {
7983
var self = this;
@@ -121,6 +125,8 @@ var authorization = module.exports = {
121125
* - scopes (Array): Optional. A list of scopes that this authorization is in.
122126
* - note (String): Optional. A note to remind you what the OAuth token is for.
123127
* - note_url (String): Optional. A URL to remind you what app the OAuth token is for.
128+
*
129+
* https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization
124130
**/
125131
this.create = function(msg, block, callback) {
126132
var self = this;
@@ -171,6 +177,8 @@ var authorization = module.exports = {
171177
* - remove_scopes (Array): Optional. A list of scopes to remove from this authorization.
172178
* - note (String): Optional. A note to remind you what the OAuth token is for.
173179
* - note_url (String): Optional. A URL to remind you what app the OAuth token is for.
180+
*
181+
* https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization
174182
**/
175183
this.update = function(msg, block, callback) {
176184
var self = this;
@@ -216,6 +224,8 @@ var authorization = module.exports = {
216224
*
217225
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
218226
* - id (String): Required.
227+
*
228+
* https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization
219229
**/
220230
this.delete = function(msg, block, callback) {
221231
var self = this;

api/v3.0.0/gists.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ var gists = module.exports = {
3030
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
3131
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
3232
* - since (Date): Optional. Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
33+
*
34+
* https://developer.github.com/v3/gists/#list-gists
3335
**/
3436
this.getAll = function(msg, block, callback) {
3537
var self = this;
@@ -125,6 +127,8 @@ var gists = module.exports = {
125127
* - description (String): Optional.
126128
* - public (Boolean): Required.
127129
* - files (Json): Required. Files that make up this gist. The key of which should be a required string filename and the value another required hash with parameters: 'content'
130+
*
131+
* https://developer.github.com/v3/gists/#create-a-gist
128132
**/
129133
this.create = function(msg, block, callback) {
130134
var self = this;
@@ -172,6 +176,8 @@ var gists = module.exports = {
172176
* - id (String): Required.
173177
* - description (String): Optional.
174178
* - files (Json): Required. Files that make up this gist. The key of which should be a required string filename and the value another required hash with parameters: 'content'
179+
*
180+
* https://developer.github.com/v3/gists/#edit-a-gist
175181
**/
176182
this.edit = function(msg, block, callback) {
177183
var self = this;
@@ -217,6 +223,8 @@ var gists = module.exports = {
217223
*
218224
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
219225
* - since (Date): Optional. Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
226+
*
227+
* https://developer.github.com/v3/gists/#list-gists
220228
**/
221229
this.public = function(msg, block, callback) {
222230
var self = this;
@@ -262,6 +270,8 @@ var gists = module.exports = {
262270
*
263271
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
264272
* - since (Date): Optional. Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
273+
*
274+
* https://developer.github.com/v3/gists/#list-gists
265275
**/
266276
this.starred = function(msg, block, callback) {
267277
var self = this;
@@ -307,6 +317,8 @@ var gists = module.exports = {
307317
*
308318
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
309319
* - id (String): Required.
320+
*
321+
* https://developer.github.com/v3/gists/#get-a-single-gist
310322
**/
311323
this.get = function(msg, block, callback) {
312324
var self = this;
@@ -352,6 +364,8 @@ var gists = module.exports = {
352364
*
353365
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
354366
* - id (String): Required.
367+
*
368+
* https://developer.github.com/v3/gists/#star-a-gist
355369
**/
356370
this.star = function(msg, block, callback) {
357371
var self = this;
@@ -397,6 +411,8 @@ var gists = module.exports = {
397411
*
398412
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
399413
* - id (String): Required.
414+
*
415+
* https://developer.github.com/v3/gists/#unstar-a-gist
400416
**/
401417
this.deleteStar = function(msg, block, callback) {
402418
var self = this;
@@ -442,6 +458,8 @@ var gists = module.exports = {
442458
*
443459
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
444460
* - id (String): Required.
461+
*
462+
* https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
445463
**/
446464
this.checkStar = function(msg, block, callback) {
447465
var self = this;
@@ -487,6 +505,8 @@ var gists = module.exports = {
487505
*
488506
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
489507
* - id (String): Required.
508+
*
509+
* https://developer.github.com/v3/gists/#fork-a-gist
490510
**/
491511
this.fork = function(msg, block, callback) {
492512
var self = this;
@@ -532,6 +552,8 @@ var gists = module.exports = {
532552
*
533553
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
534554
* - id (String): Required.
555+
*
556+
* https://developer.github.com/v3/gists/#unstar-a-gist
535557
**/
536558
this.delete = function(msg, block, callback) {
537559
var self = this;

api/v3.0.0/gitignore.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ var gitignore = module.exports = {
2828
*
2929
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
3030
* No other params, simply pass an empty Object literal `{}`
31+
*
32+
* https://developer.github.com/v3/gitignore/#listing-available-templates
3133
**/
3234
this.templates = function(msg, block, callback) {
3335
var self = this;

api/v3.0.0/issues.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ var issues = module.exports = {
3535
* - since (Date): Optional. Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
3636
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
3737
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
38+
*
39+
* https://developer.github.com/v3/issues/#list-issues
3840
**/
3941
this.getAll = function(msg, block, callback) {
4042
var self = this;
@@ -92,6 +94,8 @@ var issues = module.exports = {
9294
* - since (Date): Optional. Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
9395
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
9496
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
97+
*
98+
* https://developer.github.com/v3/issues/#list-issues-for-a-repository
9599
**/
96100
this.repoIssues = function(msg, block, callback) {
97101
var self = this;
@@ -139,6 +143,8 @@ var issues = module.exports = {
139143
* - user (String): Required.
140144
* - repo (String): Required.
141145
* - number (Number): Required. Validation rule: ` ^[0-9]+$ `.
146+
*
147+
* https://developer.github.com/v3/issues/#get-a-single-issue
142148
**/
143149
this.getRepoIssue = function(msg, block, callback) {
144150
var self = this;
@@ -190,6 +196,8 @@ var issues = module.exports = {
190196
* - assignee (String): Optional. Login for the user that this issue should be assigned to.
191197
* - milestone (Number): Optional. Milestone to associate this issue with. Validation rule: ` ^[0-9]+$ `.
192198
* - labels (Json): Optional. Array of strings - Labels to associate with this issue.
199+
*
200+
* https://developer.github.com/v3/issues/#create-an-issue
193201
**/
194202
this.create = function(msg, block, callback) {
195203
var self = this;
@@ -243,6 +251,8 @@ var issues = module.exports = {
243251
* - milestone (Number): Optional. Milestone to associate this issue with. Validation rule: ` ^[0-9]+$ `.
244252
* - labels (Json): Optional. Array of strings - Labels to associate with this issue.
245253
* - state (String): Optional. open or closed Validation rule: ` ^(open|closed)$ `.
254+
*
255+
* https://developer.github.com/v3/issues/#edit-an-issue
246256
**/
247257
this.edit = function(msg, block, callback) {
248258
var self = this;

api/v3.0.0/markdown.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ var markdown = module.exports = {
3030
* - text (String): Required. The Markdown text to render
3131
* - mode (String): Optional. The rendering mode, `markdown` to render a document as plain Markdown, just like README files are rendered. `gfm` to render a document as user-content, e.g. like user comments or issues are rendered. In GFM mode, hard line breaks are always taken into account, and issue and user mentions are linked accordingly. Validation rule: ` ^(markdown|gfm)$ `.
3232
* - context (String): Optional. The repository context, only taken into account when rendering as `gfm`
33+
*
34+
* https://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document
3335
**/
3436
this.render = function(msg, block, callback) {
3537
var self = this;
@@ -75,6 +77,8 @@ var markdown = module.exports = {
7577
*
7678
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
7779
* - data (String): Required. Raw data to send as the body of the request
80+
*
81+
* https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode
7882
**/
7983
this.renderRaw = function(msg, block, callback) {
8084
var self = this;

api/v3.0.0/orgs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ var orgs = module.exports = {
7777
* - org (String): Required.
7878
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
7979
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
80+
*
81+
* https://developer.github.com/v3/orgs/#get-an-organization
8082
**/
8183
this.get = function(msg, block, callback) {
8284
var self = this;
@@ -127,6 +129,8 @@ var orgs = module.exports = {
127129
* - email (String): Optional. Publicly visible email address.
128130
* - location (String): Optional.
129131
* - name (String): Optional.
132+
*
133+
* https://developer.github.com/v3/orgs/#edit-an-organization
130134
**/
131135
this.update = function(msg, block, callback) {
132136
var self = this;

api/v3.0.0/pullRequests.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ var pullRequests = module.exports = {
3636
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
3737
* - sort (String): Optional. Possible values are: `created`, `updated`, `popularity`, `long-running`, Default: `created` Validation rule: ` ^(created|updated|popularity|long-running)$ `.
3838
* - direction (String): Optional. Validation rule: ` ^(asc|desc)$ `.
39+
*
40+
* https://developer.github.com/v3/pulls/#list-pull-requests
3941
**/
4042
this.getAll = function(msg, block, callback) {
4143
var self = this;
@@ -83,6 +85,8 @@ var pullRequests = module.exports = {
8385
* - user (String): Required.
8486
* - repo (String): Required.
8587
* - number (Number): Required. Validation rule: ` ^[0-9]+$ `.
88+
*
89+
* https://developer.github.com/v3/pulls/#get-a-single-pull-request
8690
**/
8791
this.get = function(msg, block, callback) {
8892
var self = this;
@@ -133,6 +137,8 @@ var pullRequests = module.exports = {
133137
* - body (String): Optional.
134138
* - base (String): Required. The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.
135139
* - head (String): Required. The branch (or git ref) where your changes are implemented.
140+
*
141+
* https://developer.github.com/v3/pulls/#create-a-pull-request
136142
**/
137143
this.create = function(msg, block, callback) {
138144
var self = this;
@@ -182,6 +188,8 @@ var pullRequests = module.exports = {
182188
* - issue (Number): Required. Validation rule: ` ^[0-9]+$ `.
183189
* - base (String): Required. The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.
184190
* - head (String): Required. The branch (or git ref) where your changes are implemented.
191+
*
192+
* https://developer.github.com/v3/pulls/#create-a-pull-request
185193
**/
186194
this.createFromIssue = function(msg, block, callback) {
187195
var self = this;
@@ -232,6 +240,8 @@ var pullRequests = module.exports = {
232240
* - state (String): Optional. Validation rule: ` ^(open|closed)$ `.
233241
* - title (String): Required.
234242
* - body (String): Optional.
243+
*
244+
* https://developer.github.com/v3/pulls/#update-a-pull-request
235245
**/
236246
this.update = function(msg, block, callback) {
237247
var self = this;
@@ -281,6 +291,8 @@ var pullRequests = module.exports = {
281291
* - number (Number): Required. Validation rule: ` ^[0-9]+$ `.
282292
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
283293
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
294+
*
295+
* https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
284296
**/
285297
this.getCommits = function(msg, block, callback) {
286298
var self = this;
@@ -330,6 +342,8 @@ var pullRequests = module.exports = {
330342
* - number (Number): Required. Validation rule: ` ^[0-9]+$ `.
331343
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
332344
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
345+
*
346+
* https://developer.github.com/v3/pulls/#list-pull-requests-files
333347
**/
334348
this.getFiles = function(msg, block, callback) {
335349
var self = this;
@@ -379,6 +393,8 @@ var pullRequests = module.exports = {
379393
* - number (Number): Required. Validation rule: ` ^[0-9]+$ `.
380394
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
381395
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
396+
*
397+
* https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged
382398
**/
383399
this.getMerged = function(msg, block, callback) {
384400
var self = this;
@@ -427,6 +443,8 @@ var pullRequests = module.exports = {
427443
* - repo (String): Required.
428444
* - number (Number): Required. Validation rule: ` ^[0-9]+$ `.
429445
* - commit_message (String): Optional. The message that will be used for the merge commit
446+
*
447+
* https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button
430448
**/
431449
this.merge = function(msg, block, callback) {
432450
var self = this;

0 commit comments

Comments
 (0)