File tree 3 files changed +43
-4
lines changed
lib/Github/Api/CurrentUser 3 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ Navigation
4
4
APIs:
5
5
* [ Authorizations] ( authorizations.md )
6
6
* [ Commits] ( commits.md )
7
+ * Current User
8
+ * [ Deploy keys / Public keys] ( currentuser/deploykeys.md )
9
+ * [ Memberships] ( currentuser/memberships.md )
7
10
* [ Enterprise] ( enterprise.md )
8
11
* [ Gists] ( gists.md )
9
12
* [ Comments] ( gists/comments.md )
Original file line number Diff line number Diff line change
1
+ ## Current user / Public Keys API
2
+ [ Back to the navigation] ( ../README.md )
3
+
4
+ Wraps [ GitHub User Public Keys API] ( https://developer.github.com/v3/users/keys/#public-keys ) .
5
+
6
+ ### List your public keys
7
+
8
+ ``` php
9
+ $keys = $client->user()->keys()->all();
10
+ ```
11
+
12
+ Returns a list of public keys for the authenticated user.
13
+
14
+ ### Shows a public key for the authenticated user.
15
+
16
+ ``` php
17
+ $key = $client->user()->keys()->show(1234);
18
+ ```
19
+
20
+ ### Add a public key to the authenticated user.
21
+
22
+ > Requires [ authentication] ( security.md ) .
23
+
24
+ ``` php
25
+ $key = $client->user()->keys()->create(array('title' => 'key title', 'key' => 12345));
26
+ ```
27
+
28
+ Adds a key with title 'key title' to the authenticated user and returns a the created key for the user.
29
+
30
+ ### Remove a public key from the authenticated user.
31
+
32
+ > Requires [ authentication] ( security.md ) .
33
+
34
+ ``` php
35
+ $client->user()->keys()->remove(12345);
36
+ ```
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class DeployKeys extends AbstractApi
14
14
/**
15
15
* List deploy keys for the authenticated user.
16
16
*
17
- * @link http ://developer.github.com/v3/repos /keys/
17
+ * @link https ://developer.github.com/v3/users /keys/
18
18
*
19
19
* @return array
20
20
*/
@@ -26,7 +26,7 @@ public function all()
26
26
/**
27
27
* Shows deploy key for the authenticated user.
28
28
*
29
- * @link http ://developer.github.com/v3/repos /keys/
29
+ * @link https ://developer.github.com/v3/users /keys/
30
30
*
31
31
* @param string $id
32
32
*
@@ -40,7 +40,7 @@ public function show($id)
40
40
/**
41
41
* Adds deploy key for the authenticated user.
42
42
*
43
- * @link http ://developer.github.com/v3/repos /keys/
43
+ * @link https ://developer.github.com/v3/users /keys/
44
44
*
45
45
* @param array $params
46
46
*
@@ -60,7 +60,7 @@ public function create(array $params)
60
60
/**
61
61
* Removes deploy key for the authenticated user.
62
62
*
63
- * @link http ://developer.github.com/v3/repos /keys/
63
+ * @link https ://developer.github.com/v3/users /keys/
64
64
*
65
65
* @param string $id
66
66
*
You can’t perform that action at this time.
0 commit comments