Get a single unauthenticated user
@example
github = Github.new github.users.get user: 'user-name'
Get the authenticated user
@example
github = Github.new oauth_token: '...' github.users.get
@api public
# File lib/github_api/client/users.rb, line 65 def get(*args) params = arguments(args).params if user_name = params.delete('user') get_request("/users/#{user_name}", params) else get_request("/user", params) end end
List all users.
This provides a dump of every user, in the order that they signed up for GitHub.
@param [Hash] params @option [Integer] :since
The integer ID of the last User that you’ve seen.
@example
users = Github::Users.new users.list
@api public
# File lib/github_api/client/users.rb, line 43 def list(*args) arguments(args) response = get_request("/users", arguments.params) return response unless block_given? response.each { |el| yield el } end
Update the authenticated user
@param [Hash] params @option params [String] :name
Optional string
@option params [String] :email
Optional string - publically visible email address
@option params [String] :blog
Optional string
@option params [String] :company
Optional string
@option params [String] :location
Optional string
@option params [String] :hireable
Optional boolean
@option params [String] :bio
Optional string
@example
github = Github.new oauth_token: '..' github.users.update name: "monalisa octocat", email: "octocat@github.com", blog: "https://github.com/blog", company: "GitHub", location: "San Francisco", hireable: true, bio: "There once..."
@api public
# File lib/github_api/client/users.rb, line 106 def update(*args) arguments(args) do permit VALID_USER_PARAMS_NAMES end patch_request("/user", arguments.params) end
Generated with the Darkfish Rdoc Generator 2.