publickeys.md

October 22, 2022 ยท View on GitHub

Current user / Public Keys API

Back to the navigation

Wraps GitHub User Public Keys API.

List your public keys

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

Returns a list of public keys for the authenticated user.

Shows a public key for the authenticated user.

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

Add a public key to the authenticated user.

Requires authentication.

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

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

Remove a public key from the authenticated user.

Requires authentication.

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