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(user_name=nil, params={})
@github.users.get
@github = Github.new :oauth_token => '...'
= Examples
Get the authenticated user
github.users.get 'user-name'
github = Github.new
= Examples
Get a single unauthenticated user
def get(user_name=nil, params={}) _normalize_params_keys(params) if user_name 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(params={})
"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(params={}) _normalize_params_keys(params) _filter_params_keys(VALID_USER_PARAMS_NAMES, params) patch_request("/user", params) end