You are here

public function Github_Api_User::addKey in Bibliography Module 7.2

Add a public key to the authenticated user. Requires authentication.

Return value

array list of public keys of the user

File

modules/CiteProc/Github/Api/User.php, line 144

Class

Github_Api_User
Searching users, getting user information and managing authenticated user account information.

Code

public function addKey($title, $key) {
  $response = $this
    ->post('user/key/add', array(
    'title' => $title,
    'key' => $key,
  ));
  return $response['public_keys'];
}