View Source GitHub.Users (GitHub REST API Client v0.0.1-beta.0)

Provides API endpoints related to users

Link to this section Summary

Functions

Add an email address for the authenticated user

Check if a user is blocked by the authenticated user

Check if a person is followed by the authenticated user

Create a GPG key for the authenticated user

Create a public SSH key for the authenticated user

Create a SSH signing key for the authenticated user

Delete an email address for the authenticated user

Delete a GPG key for the authenticated user

Delete a public SSH key for the authenticated user

Delete an SSH signing key for the authenticated user

Get the authenticated user

Get contextual information for a user

Get a GPG key for the authenticated user

Get a public SSH key for the authenticated user

Get an SSH signing key for the authenticated user

List users

List users blocked by the authenticated user

List email addresses for the authenticated user

List the people the authenticated user follows

List followers of the authenticated user

List the people a user follows

List GPG keys for the authenticated user

List public email addresses for the authenticated user

List public SSH keys for the authenticated user

List SSH signing keys for the authenticated user

List SSH signing keys for a user

Set primary email visibility for the authenticated user

Update the authenticated user

Link to this section Functions

Link to this function

add_email_for_authenticated_user(body, opts \\ [])

View Source
@spec add_email_for_authenticated_user(
  map() | String.t() | [String.t()],
  keyword()
) :: {:ok, [GitHub.Email.t()]} | {:error, GitHub.Error.t()}

Add an email address for the authenticated user

resources

Resources

Link to this function

block(username, opts \\ [])

View Source
@spec block(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Block a user

resources

Resources

Link to this function

check_blocked(username, opts \\ [])

View Source
@spec check_blocked(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Check if a user is blocked by the authenticated user

resources

Resources

Link to this function

check_following_for_user(username, target_user, opts \\ [])

View Source
@spec check_following_for_user(String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Check if a user follows another user

resources

Resources

Link to this function

check_person_is_followed_by_authenticated(username, opts \\ [])

View Source
@spec check_person_is_followed_by_authenticated(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Check if a person is followed by the authenticated user

resources

Resources

Link to this function

create_gpg_key_for_authenticated_user(body, opts \\ [])

View Source
@spec create_gpg_key_for_authenticated_user(
  map(),
  keyword()
) :: {:ok, GitHub.GpgKey.t()} | {:error, GitHub.Error.t()}

Create a GPG key for the authenticated user

resources

Resources

Link to this function

create_public_ssh_key_for_authenticated_user(body, opts \\ [])

View Source
@spec create_public_ssh_key_for_authenticated_user(
  map(),
  keyword()
) :: {:ok, GitHub.Key.t()} | {:error, GitHub.Error.t()}

Create a public SSH key for the authenticated user

resources

Resources

Link to this function

create_ssh_signing_key_for_authenticated_user(body, opts \\ [])

View Source
@spec create_ssh_signing_key_for_authenticated_user(
  map(),
  keyword()
) :: {:ok, GitHub.SSHSigningKey.t()} | {:error, GitHub.Error.t()}

Create a SSH signing key for the authenticated user

resources

Resources

Link to this function

delete_email_for_authenticated_user(body, opts \\ [])

View Source
@spec delete_email_for_authenticated_user(
  map() | String.t() | [String.t()],
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete an email address for the authenticated user

resources

Resources

Link to this function

delete_gpg_key_for_authenticated_user(gpg_key_id, opts \\ [])

View Source
@spec delete_gpg_key_for_authenticated_user(
  integer(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a GPG key for the authenticated user

resources

Resources

Link to this function

delete_public_ssh_key_for_authenticated_user(key_id, opts \\ [])

View Source
@spec delete_public_ssh_key_for_authenticated_user(
  integer(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a public SSH key for the authenticated user

resources

Resources

Link to this function

delete_ssh_signing_key_for_authenticated_user(ssh_signing_key_id, opts \\ [])

View Source
@spec delete_ssh_signing_key_for_authenticated_user(
  integer(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete an SSH signing key for the authenticated user

resources

Resources

Link to this function

follow(username, opts \\ [])

View Source
@spec follow(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Follow a user

resources

Resources

Link to this function

get_authenticated(opts \\ [])

View Source
@spec get_authenticated(keyword()) ::
  {:ok, GitHub.User.private() | GitHub.User.public()}
  | {:error, GitHub.Error.t()}

Get the authenticated user

resources

Resources

Link to this function

get_by_username(username, opts \\ [])

View Source
@spec get_by_username(
  String.t(),
  keyword()
) ::
  {:ok, GitHub.User.private() | GitHub.User.public()}
  | {:error, GitHub.Error.t()}

Get a user

resources

Resources

Link to this function

get_context_for_user(username, opts \\ [])

View Source
@spec get_context_for_user(
  String.t(),
  keyword()
) :: {:ok, GitHub.Hovercard.t()} | {:error, GitHub.Error.t()}

Get contextual information for a user

options

Options

  • subject_type (String.t()): Identifies which additional information you'd like to receive about the person's hovercard. Can be organization, repository, issue, pull_request. Required when using subject_id.
  • subject_id (String.t()): Uses the ID for the subject_type you specified. Required when using subject_type.

resources

Resources

Link to this function

get_gpg_key_for_authenticated_user(gpg_key_id, opts \\ [])

View Source
@spec get_gpg_key_for_authenticated_user(
  integer(),
  keyword()
) :: {:ok, GitHub.GpgKey.t()} | {:error, GitHub.Error.t()}

Get a GPG key for the authenticated user

resources

Resources

Link to this function

get_public_ssh_key_for_authenticated_user(key_id, opts \\ [])

View Source
@spec get_public_ssh_key_for_authenticated_user(
  integer(),
  keyword()
) :: {:ok, GitHub.Key.t()} | {:error, GitHub.Error.t()}

Get a public SSH key for the authenticated user

resources

Resources

Link to this function

get_ssh_signing_key_for_authenticated_user(ssh_signing_key_id, opts \\ [])

View Source
@spec get_ssh_signing_key_for_authenticated_user(
  integer(),
  keyword()
) :: {:ok, GitHub.SSHSigningKey.t()} | {:error, GitHub.Error.t()}

Get an SSH signing key for the authenticated user

resources

Resources

@spec list(keyword()) :: {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

List users

options

Options

  • since (integer): A user ID. Only return users with an ID greater than this ID.
  • per_page (integer): The number of results per page (max 100).

resources

Resources

Link to this function

list_blocked_by_authenticated_user(opts \\ [])

View Source
@spec list_blocked_by_authenticated_user(keyword()) ::
  {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

List users blocked by the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_emails_for_authenticated_user(opts \\ [])

View Source
@spec list_emails_for_authenticated_user(keyword()) ::
  {:ok, [GitHub.Email.t()]} | {:error, GitHub.Error.t()}

List email addresses for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_followed_by_authenticated_user(opts \\ [])

View Source
@spec list_followed_by_authenticated_user(keyword()) ::
  {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

List the people the authenticated user follows

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_followers_for_authenticated_user(opts \\ [])

View Source
@spec list_followers_for_authenticated_user(keyword()) ::
  {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

List followers of the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_followers_for_user(username, opts \\ [])

View Source
@spec list_followers_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

List followers of a user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_following_for_user(username, opts \\ [])

View Source
@spec list_following_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

List the people a user follows

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_gpg_keys_for_authenticated_user(opts \\ [])

View Source
@spec list_gpg_keys_for_authenticated_user(keyword()) ::
  {:ok, [GitHub.GpgKey.t()]} | {:error, GitHub.Error.t()}

List GPG keys for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_gpg_keys_for_user(username, opts \\ [])

View Source
@spec list_gpg_keys_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.GpgKey.t()]} | {:error, GitHub.Error.t()}

List GPG keys for a user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_public_emails_for_authenticated_user(opts \\ [])

View Source
@spec list_public_emails_for_authenticated_user(keyword()) ::
  {:ok, [GitHub.Email.t()]} | {:error, GitHub.Error.t()}

List public email addresses for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_public_keys_for_user(username, opts \\ [])

View Source
@spec list_public_keys_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.Key.simple()]} | {:error, GitHub.Error.t()}

List public keys for a user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_public_ssh_keys_for_authenticated_user(opts \\ [])

View Source
@spec list_public_ssh_keys_for_authenticated_user(keyword()) ::
  {:ok, [GitHub.Key.t()]} | {:error, GitHub.Error.t()}

List public SSH keys for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_ssh_signing_keys_for_authenticated_user(opts \\ [])

View Source
@spec list_ssh_signing_keys_for_authenticated_user(keyword()) ::
  {:ok, [GitHub.SSHSigningKey.t()]} | {:error, GitHub.Error.t()}

List SSH signing keys for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_ssh_signing_keys_for_user(username, opts \\ [])

View Source
@spec list_ssh_signing_keys_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.SSHSigningKey.t()]} | {:error, GitHub.Error.t()}

List SSH signing keys for a user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

set_primary_email_visibility_for_authenticated_user(body, opts \\ [])

View Source
@spec set_primary_email_visibility_for_authenticated_user(
  map(),
  keyword()
) :: {:ok, [GitHub.Email.t()]} | {:error, GitHub.Error.t()}

Set primary email visibility for the authenticated user

resources

Resources

Link to this function

unblock(username, opts \\ [])

View Source
@spec unblock(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Unblock a user

resources

Resources

Link to this function

unfollow(username, opts \\ [])

View Source
@spec unfollow(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Unfollow a user

resources

Resources

Link to this function

update_authenticated(body, opts \\ [])

View Source
@spec update_authenticated(
  map(),
  keyword()
) :: {:ok, GitHub.User.private()} | {:error, GitHub.Error.t()}

Update the authenticated user

resources

Resources