class Github::Users
def emails
def emails @emails ||= ApiFactory.new 'Users::Emails' end
def followers
def followers @followers ||= ApiFactory.new 'Users::Followers' end
def get(*args)
github.users.get
github = Github.new oauth_token: '...'
= Examples
Get the authenticated user
github.users.get user: 'user-name'
github = Github.new
= Examples
Get a single unauthenticated user
def get(*args) params = args.extract_options! normalize! params if user_name = params.delete('user') get_request("/users/#{user_name}", params) else get_request("/user", params) end end
def initialize(options = {})
def initialize(options = {}) super(options) end
def keys
def keys @keys ||= ApiFactory.new 'Users::Keys' end
def update(*args)
"bio" => "There once..."
"hireable" => true,
"location" => "San Francisco",
"company" => "GitHub",
"blog" => "https://github.com/blog",
"email" => "octocat@github.com",
"name" => "monalisa octocat",
github.users.update
github = Github.new :oauth_token => '..'
= Examples
* :bio - Optional string
* :hireable - Optional boolean
* :location - Optional string
* :company - Optional string
* :blog - Optional string
* :email - Optional string - publically visible email address
* :name - Optional string
= Inputs
Update the authenticated user
def update(*args) params = args.extract_options! normalize! params filter! VALID_USER_PARAMS_NAMES, params patch_request("/user", params) end