Octokit::Client::Users
Instance methods
Add email address to user.
Example:
@client.add_email("new_email@user.com")
Note: Requires authenticated client.
See Also:
Add public key to user account.
Example:
@client.add_key("Personal projects key", "ssh-rsa AAA...")
Note: Requires authenticated client.
See Also:
List all GitHub users
This provides a list of every user, in the order that they signed up for GitHub.
See Also:
List email addresses for a user.
Example:
@client.emails
Note: Requires an authenticated client.
See Also:
Retrieve access token
Example:
Octokit.client.exchange_code_for_token("aaaa", "xxxx", "yyyy", {accept: "application/json"})
See Also:
Follow a user.
Example:
@client.follow("monalisa")
Note: Requires an authenticated user.
See Also:
Get a user's followers
Example:
Octokit.client.followers("monalisa")
See Also:
Get a list of users the user is following
Example:
Octokit.client.following("monalisa")
See Also:
Check if you is following a user. Alternatively check if a given user is following a target user.
Examples:
@client.follows?("asterite")
@client.follows?("asterite", "waj")
Note: Requires an authenticated user.
See Also:
Get a public key.
Examples:
@client.key(1)
# Retrieve public key contents
public_key = @client.key(1)
public_key.key
# => Error
public_key[:key]
# => "ssh-rsa AAA..."
Note: when using dot notation to retrieve the values, ruby will return the hash key for the public keys value instead of the actual value, use symbol or key string to retrieve the value. See example.
Note: Requires an authenticated client.
See Also:
Get a list of public keys for a user.
Examples:
@client.keys
@client.keys("monalisa")
Note: Requires an authenticated client.
See Also:
List public email addresses for a user.
Example:
@client.public_emails
Note: Requires an authenticated client.
See Also:
Remove email from user.
Example:
@client.remove_email("old_email@user.com")
Note: Requires authenticated client.
See Also:
Delete a public key.
Example:
@client.remove_key(1)
Note: Requires an authenticated client.
See Also:
Get a list of repos starred by a user.
Example:
Octokit.client.starred("monalisa")
See Also:
Check if you are starring a repo.
Example:
@client.starred?("watzon/octokit")
Note: Requires an authenticated client.
See Also:
List repositories being watched by a user.
Example:
@client.subscriptions("monalisa")
See Also:
Toggle the visibility of the users primary email addresses.
Example:
@client.toggle_email_visibility([{email: "email@user.com", visibility: "private"}])
Note: Requires authenticated client.
See Also:
Unfollow a user.
Example:
@client.unfollow("monalisa")
Note: Requires an authenticated user.
See Also:
Update the authenticated user
Example:
Octokit.client.update_user(name: "Chris Watson", email: "cawatson1993@gmail.com", company: "Manas Tech", location: "Buenos Aires", hireable: false)
See Also: