Sync changes from upstream repository · JavaLeaks/developer.github.com@bdc770d · GitHub
Skip to content

Commit bdc770d

Browse files
Hubotgjtorikian
authored andcommitted
Sync changes from upstream repository
1 parent f687ebb commit bdc770d

3 files changed

Lines changed: 148 additions & 2 deletions

File tree

Lines changed: 38 additions & 0 deletions

content/v3/orgs/members.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,95 @@ The user can publicize their own membership.
115115
### Response
116116

117117
<%= headers 204 %>
118+
119+
## List your organization memberships
120+
121+
<div class="alert">
122+
<p>
123+
The Organization Memberships API is currently available for developers to preview.
124+
During the preview period, the API may change without notice.
125+
Please see the <a href="/changes/2014-08-28-accepting-organization-invitations-from-the-api/">blog post</a> for full details.
126+
</p>
127+
128+
<p>
129+
To access the API during the preview period, you must provide a custom <a href="/v3/media">media type</a> in the <code>Accept</code> header:
130+
<pre>application/vnd.github.the-wasp-preview+json</pre>
131+
</p>
132+
</div>
133+
134+
An optional `state` can be passed to request only pending or active memberships.
135+
136+
GET /user/memberships/orgs
137+
GET /user/memberships/orgs?state=active
138+
GET /user/memberships/orgs?state=pending
139+
140+
### Response when no state is specified
141+
142+
<%= headers 200, :pagination => default_pagination_rels %>
143+
<%= json(:org_memberships) %>
144+
145+
### Response when a "pending" state is specified
146+
147+
<%= headers 200, :pagination => default_pagination_rels %>
148+
<%= json(:pending_org_memberships) %>
149+
150+
### Response when an "active" state is specified
151+
152+
<%= headers 200, :pagination => default_pagination_rels %>
153+
<%= json(:active_org_memberships) %>
154+
155+
## Get your organization membership
156+
157+
<div class="alert">
158+
<p>
159+
The Organization Memberships API is currently available for developers to preview.
160+
During the preview period, the API may change without notice.
161+
Please see the <a href="/changes/2014-08-28-accepting-organization-invitations-from-the-api/">blog post</a> for full details.
162+
</p>
163+
164+
<p>
165+
To access the API during the preview period, you must provide a custom <a href="/v3/media">media type</a> in the <code>Accept</code> header:
166+
<pre>application/vnd.github.the-wasp-preview+json</pre>
167+
</p>
168+
</div>
169+
170+
GET /user/memberships/orgs/:org
171+
172+
### Response
173+
174+
<%= headers 200 %>
175+
<%= json(:pending_org_membership) %>
176+
177+
## Edit your organization membership
178+
179+
<div class="alert">
180+
<p>
181+
The Organization Memberships API is currently available for developers to preview.
182+
During the preview period, the API may change without notice.
183+
Please see the <a href="/changes/2014-08-28-accepting-organization-invitations-from-the-api/">blog post</a> for full details.
184+
</p>
185+
186+
<p>
187+
To access the API during the preview period, you must provide a custom <a href="/v3/media">media type</a> in the <code>Accept</code> header:
188+
<pre>application/vnd.github.the-wasp-preview+json</pre>
189+
</p>
190+
</div>
191+
192+
PATCH /user/memberships/orgs/:org
193+
194+
### Input
195+
196+
Name | Type | Description
197+
-----|------|--------------
198+
`state`|`string`| **Required**. The state that the membership should be in. Only `"active"` will be accepted.
199+
200+
### Example
201+
202+
<%= json \
203+
:state => "active"
204+
%>
205+
206+
### Response
207+
208+
<%= headers 200 %>
209+
<%= json(:active_org_membership) %>

lib/resources.rb

Lines changed: 18 additions & 2 deletions

0 commit comments

Comments
 (0)