Skip to content

Commit 1367eb4

Browse files
committed
Add some documentation for memberships
1 parent 958b152 commit 1367eb4

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

doc/currentuser/memberships.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Current user / Memberships API
2+
[Back to the navigation](../README.md)
3+
4+
Wraps [GitHub Issue Comments API](https://developer.github.com/v3/orgs/members/#get-your-organization-membership).
5+
6+
### List your memberships
7+
8+
> Requires [authentication](../security.md).
9+
10+
```php
11+
$memberships = $client->user()->memberships()->all();
12+
```
13+
14+
Returns an array of your memberships in all organizations you are part of.
15+
16+
### Show an organization membership
17+
18+
> Requires [authentication](../security.md).
19+
20+
```php
21+
$membership = $client->user()->memberships()->organization('KnpLabs');
22+
```
23+
* `KnpLabs` : the organization
24+
25+
Returns an array of one membership in a specific organization.
26+
27+
### Update an organization membership
28+
29+
> Requires [authentication](../security.md).
30+
31+
```php
32+
$membership = $client->user()->memberships()->edit('KnpLabs');
33+
```
34+
* `KnpLabs` : the organization
35+
36+
Update your membership to an organization. The only possible action is to activate your membership.

0 commit comments

Comments
 (0)