Skip to content

Commit 94c27f1

Browse files
committed
Make sure all post methods have docs about what to post
1 parent 1d8155b commit 94c27f1

15 files changed

Lines changed: 198 additions & 85 deletions

File tree

content/v3/gists.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ List the authenticated user's starred gists:
4444
### Input
4545

4646
description
47-
: _Optional_ **string** describing this gist.
47+
: _Optional_ **string**
4848

4949
public
50-
: _Required_ **boolean** specifying if this gist is public or not.
50+
: _Required_ **boolean**
5151

5252
files
53-
: _Required_ **hash** of files that make up this gist. The key of which
53+
: _Required_ **hash** - Files that make up this gist. The key of which
5454
should be a _required_ **string** filename and the value another
5555
_required_ **hash** with parameters:
5656

5757
content
58-
: _Required_ **string** file contents.
58+
: _Required_ **string** - File contents.
5959

6060
<%= json \
6161
:description => "the description for this gist",
@@ -77,18 +77,18 @@ _required_ **hash** with parameters:
7777
### Input
7878

7979
description
80-
: _Optional_ **string** describing this gist.
80+
: _Optional_ **string**
8181

8282
files
83-
: _Optional_ **hash** of files that make up this gist. The key of which
83+
: _Optional_ **hash** - Files that make up this gist. The key of which
8484
should be an _optional_ **string** filename and the value another
8585
_optional_ **hash** with parameters:
8686

8787
content
88-
: _Optional_ **string** of updated file contents.
88+
: _Optional_ **string** - Updated file contents.
8989

9090
filename
91-
: _Optional_ **string** of a new name for this file.
91+
: _Optional_ **string** - New name for this file.
9292

9393
NOTE: All files from the previous version of the gist are carried over by
9494
default if not included in the hash. Deletes can be performed by

content/v3/gists/comments.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ title: Gist Comments API v3 | developer.github.com
2828

2929
### Input
3030

31+
body
32+
: _Required_ **string**
33+
3134
<%= json :body => 'Just commenting for the sake of commenting' %>
3235

3336
### Response
@@ -42,6 +45,9 @@ title: Gist Comments API v3 | developer.github.com
4245

4346
### Input
4447

48+
body
49+
: _Required_ **string**
50+
4551
<%= json :body => 'Just commenting for the sake of commenting' %>
4652

4753
### Response

content/v3/issues.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ body
5959
: _Optional_ **string**
6060

6161
assignee
62-
: _Optional_ **string** - login for the user that this issue should be
62+
: _Optional_ **string** - Login for the user that this issue should be
6363
assigned to.
6464

6565
milestone
66-
: _Optional_ **number** - milestone to associate this issue with.
66+
: _Optional_ **number** - Milestone to associate this issue with.
6767

68-
lables
69-
: _Optional_ **array** of **strings** - labels to associate with this
68+
labels
69+
: _Optional_ **array** of **strings** - Labels to associate with this
7070
issue.
7171

7272
<%= json \
@@ -97,18 +97,17 @@ body
9797
: _Optional_ **string**
9898

9999
assignee
100-
: _Optional_ **string** - login for the user that this issue should be
100+
: _Optional_ **string** - Login for the user that this issue should be
101101
assigned to.
102102

103103
state
104-
: _Optional_ **string** - change the state of the issue to `open` or
105-
`closed`.
104+
: _Optional_ **string** - State of the issue: `open` or `closed`.
106105

107106
milestone
108-
: _Optional_ **number** - milestone to associate this issue with.
107+
: _Optional_ **number** - Milestone to associate this issue with.
109108

110-
lables
111-
: _Optional_ **array** of **strings** - labels to associate with this
109+
labels
110+
: _Optional_ **array** of **strings** - Labels to associate with this
112111
issue. Pass one or more Labels to _replace_ the set of Labels on this
113112
Issue. Send an empty array (`[]`) to clear all Labels from the Issue.
114113

@@ -125,4 +124,3 @@ Issue. Send an empty array (`[]`) to clear all Labels from the Issue.
125124

126125
<%= headers 200 %>
127126
<%= json :issue %>
128-

content/v3/issues/comments.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ title: Issue Comments API v3 | developer.github.com
2828

2929
### Input
3030

31-
<%= json :body => "String" %>
31+
body
32+
: _Required_ **string**
33+
34+
<%= json :body => "a new comment" %>
3235

3336
### Response
3437

@@ -43,6 +46,9 @@ title: Issue Comments API v3 | developer.github.com
4346

4447
### Input
4548

49+
body
50+
: _Required_ **string**
51+
4652
<%= json :body => "String" %>
4753

4854
### Response

content/v3/issues/labels.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ title: Issue Labels API v3 | developer.github.com
2828

2929
### Input
3030

31-
<%= json :name => "String", :color => "hex" %>
31+
name
32+
: _Required_ **string**
3233

33-
*Note*: `color` takes a 6 character hex code, without a leading `#`.
34+
color
35+
: _Required_ **string** - 6 character hex code, without a leading `#`.
36+
37+
<%= json :name => "API", :color => "FFFFFF" %>
3438

3539
### Response
3640

@@ -45,9 +49,13 @@ title: Issue Labels API v3 | developer.github.com
4549

4650
### Input
4751

48-
<%= json :name => "String", :color => "hex" %>
52+
name
53+
: _Required_ **string**
54+
55+
color
56+
: _Required_ **string** - 6 character hex code, without a leading `#`.
4957

50-
*Note*: `color` takes a 6 character hex code, without a leading `#`.
58+
<%= json :name => "API", :color => "FFFFFF" %>
5159

5260
### Response
5361

@@ -76,6 +84,7 @@ title: Issue Labels API v3 | developer.github.com
7684
POST /repos/:user/:repo/issues/:id/labels
7785

7886
### Input
87+
7988
<%= json({:array => %w(Label1 Label2)}) { |h| h['array'] } %>
8089

8190
### Response
@@ -97,6 +106,7 @@ title: Issue Labels API v3 | developer.github.com
97106
PUT /repos/:user/:repo/issues/:id/labels
98107

99108
### Input
109+
100110
<%= json(:array => %w(Label1 Label2)) { |h| h['array'] } %>
101111

102112
Sending an empty array (`[]`) will remove all Labels from the Issue.
@@ -122,4 +132,3 @@ Sending an empty array (`[]`) will remove all Labels from the Issue.
122132

123133
<%= headers 200 %>
124134
<%= json(:label) { |h| [h] } %>
125-

content/v3/issues/milestones.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ direction
3737

3838
### Input
3939

40+
title
41+
: _Required_ **string**
42+
43+
state
44+
: _Optional_ **string** - `open` or `closed`. Default is `open`.
45+
46+
description
47+
: _Optional_ **string**
48+
49+
due\_on
50+
: _Optional_ **string** - ISO 8601 time.
51+
4052
<%= json \
4153
:title => "String",
4254
:state => "open or closed",
@@ -57,6 +69,18 @@ direction
5769

5870
### Input
5971

72+
title
73+
: _Required_ **string**
74+
75+
state
76+
: _Optional_ **string** - `open` or `closed`. Default is `open`.
77+
78+
description
79+
: _Optional_ **string**
80+
81+
due\_on
82+
: _Optional_ **string** - ISO 8601 time.
83+
6084
<%= json \
6185
:title => "String",
6286
:state => "open or closed",

content/v3/orgs.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ List all public organizations for a user.
1111
GET /users/:user/orgs
1212

1313
List public and private organizations for the authenticated user.
14-
(_Login required_)
1514

1615
GET /user/orgs
1716

@@ -29,27 +28,27 @@ List public and private organizations for the authenticated user.
2928
<%= headers 200 %>
3029
<%= json(:full_org) %>
3130

32-
## Edit [A,R,PR]
31+
## Edit
3332

3433
PATCH /orgs/:org
3534

3635
### Input
3736

3837
billing_email
39-
: _Optional_ **string** for a billing email address. This address is not
38+
: _Optional_ **string** - Billing email address. This address is not
4039
publicized.
4140

4241
company
43-
: _Optional_ **string** company this organization belongs to.
42+
: _Optional_ **string**
4443

4544
email
46-
: _Optional_ **string** for a publically visible email address.
45+
: _Optional_ **string** - Publically visible email address.
4746

4847
location
49-
: _Optional_ **string** where this organization is located.
48+
: _Optional_ **string**
5049

5150
name
52-
: _Optional_ **string** name of this organization.
51+
: _Optional_ **string**
5352

5453
<%= json \
5554
:billing_email => "support@github.com",

content/v3/orgs/teams.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,28 @@ In order to create a team, the authenticated user must be an owner of
3535

3636
### Input
3737

38-
<%= json \
39-
:name => 'new team',
40-
:permission => 'push',
41-
:repo_names => ['github/dotfiles'] %>
38+
name
39+
: _Required_ **string**
40+
41+
repo\_names
42+
: _Optional_ **array** of **strings**
43+
44+
permission
45+
: _Optional_ **string**
46+
47+
`pull` - team members can pull, but not push or administor this
48+
repositories. **Default**
4249

43-
Valid permissions:
50+
`push` - team members can pull and push, but not administor this
51+
repositores.
4452

45-
* **pull** - team members can pull, but not push or administor this
46-
repositories.
47-
* **push** - team members can pull and push, but not administor this
48-
repositores.
49-
* **admin** - team members can pull, push and administor these
50-
repositories.
53+
`admin` - team members can pull, push and administor these
54+
repositories.
55+
56+
<%= json \
57+
:name => 'new team',
58+
:permission => 'push',
59+
:repo_names => ['github/dotfiles'] %>
5160

5261
### Response
5362

@@ -63,9 +72,15 @@ the org that the team is associated with.
6372

6473
### Input
6574

75+
name
76+
: _Required_ **string**
77+
78+
permission
79+
: _Optional_ **string**
80+
6681
<%= json \
67-
:name => 'new team name',
68-
:permission => 'push' %>
82+
:name => 'new team name',
83+
:permission => 'push' %>
6984

7085
### Response
7186

content/v3/pulls.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ title: Pull Request API v3 | developer.github.com
88

99
GET /repo/:user/:repo/pulls
1010

11+
### Parameters
12+
13+
state
14+
: _Optional_ **string** - `open` or `closed` to filter by state. Default
15+
is `open`.
16+
1117
### Response
1218

1319
<%= headers 200 %>
@@ -29,18 +35,16 @@ title: Pull Request API v3 | developer.github.com
2935
### Input
3036

3137
title
32-
: _Optional_ **string** title for this Pull Request. This will default
33-
to the branch name if no value is specified.
38+
: _Required_ **string**
3439

3540
body
36-
: _Optional_ **string** describing this Pull Request.
41+
: _Optional_ **string**
3742

3843
base
39-
: _Required_ **string** specifying the branch you want your changes
40-
pulled into.
44+
: _Required_ **string** - The branch you want your changes pulled into.
4145

4246
head
43-
: _Required_ **string** specifying the branch where your changes are implemented.
47+
: _Required_ **string** - The branch where your changes are implemented.
4448

4549
NOTE: `head` and `base` can be either a sha or a branch name. Typically you
4650
would namespace `head` with a user like this: `username:branch`.
@@ -58,7 +62,7 @@ You can also create a Pull Request from an existing Issue by passing an
5862
Issue number instead of `title` and `body`.
5963

6064
issue
61-
: _Required_ **number** of an issue in this repository to turn into a
65+
: _Required_ **number** - Issue number in this repository to turn into a
6266
Pull Request.
6367

6468
<%= json \
@@ -79,15 +83,14 @@ Pull Request.
7983
### Input
8084

8185
title
82-
: _Optional_ **string** title for this Pull Request. This will default
83-
to the branch name if no value is specified.
86+
: _Optional_ **string**
8487

8588
body
86-
: _Optional_ **string** describing this Pull Request.
89+
: _Optional_ **string**
8790

8891
state
89-
: _Optional_ **string** to update the state of this Pull Request. Valid
90-
values are `open` and `closed`.
92+
: _Optional_ **string** - State of this Pull Request. Valid values are
93+
`open` and `closed`.
9194

9295
<%= json \
9396
:title => "new title",

0 commit comments

Comments
 (0)