File tree Expand file tree Collapse file tree 3 files changed +43
-4
lines changed
lib/Github/Api/CurrentUser Expand file tree Collapse file tree 3 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ Navigation
44APIs:
55* [ Authorizations] ( authorizations.md )
66* [ Commits] ( commits.md )
7+ * Current User
8+ * [ Deploy keys / Public keys] ( currentuser/deploykeys.md )
9+ * [ Memberships] ( currentuser/memberships.md )
710* [ Enterprise] ( enterprise.md )
811* [ Gists] ( gists.md )
912 * [ 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
1414 /**
1515 * List deploy keys for the authenticated user.
1616 *
17- * @link http ://developer.github.com/v3/repos /keys/
17+ * @link https ://developer.github.com/v3/users /keys/
1818 *
1919 * @return array
2020 */
@@ -26,7 +26,7 @@ public function all()
2626 /**
2727 * Shows deploy key for the authenticated user.
2828 *
29- * @link http ://developer.github.com/v3/repos /keys/
29+ * @link https ://developer.github.com/v3/users /keys/
3030 *
3131 * @param string $id
3232 *
@@ -40,7 +40,7 @@ public function show($id)
4040 /**
4141 * Adds deploy key for the authenticated user.
4242 *
43- * @link http ://developer.github.com/v3/repos /keys/
43+ * @link https ://developer.github.com/v3/users /keys/
4444 *
4545 * @param array $params
4646 *
@@ -60,7 +60,7 @@ public function create(array $params)
6060 /**
6161 * Removes deploy key for the authenticated user.
6262 *
63- * @link http ://developer.github.com/v3/repos /keys/
63+ * @link https ://developer.github.com/v3/users /keys/
6464 *
6565 * @param string $id
6666 *
You can’t perform that action at this time.
0 commit comments