Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 865 Bytes

publickeys.md

File metadata and controls

36 lines (23 loc) · 865 Bytes

Current user / Public Keys API

Back to the navigation

Wraps GitHub User Public Keys API.

List your public keys

$keys = $client->user()->keys()->all();

Returns a list of public keys for the authenticated user.

Shows a public key for the authenticated user.

$key = $client->user()->keys()->show(1234);

Add a public key to the authenticated user.

Requires authentication.

$key = $client->user()->keys()->create(array('title' => 'key title', 'key' => 12345));

Adds a key with title 'key title' to the authenticated user and returns a the created key for the user.

Remove a public key from the authenticated user.

Requires authentication.

$client->user()->keys()->remove(12345);