Method: Github::Users::Keys#update

Defined in:
lib/github_api/users/keys.rb

#update(*args) ⇒ Object

Update a public key for the authenticated user

Inputs

  • :title - Required string

  • :key - Required string. sha key

Examples

github = Github.new oauth_token: '...'
github.users.keys.update 'key-id', "title": "octocat@octomac",
  "key": "ssh-rsa AAA..."


73
74
75
76
77
78
# File 'lib/github_api/users/keys.rb', line 73

def update(*args)
  arguments(args, :required => [:key_id]) do
    sift VALID_KEY_PARAM_NAMES
  end
  patch_request("/user/keys/#{key_id}", arguments.params)
end