GhEx.Users (gh_ex v0.3.2)

Copy Markdown View Source

Convenience functions for the GitHub Users REST API.

Thin wrappers over GhEx.REST that return the same {:ok, body, meta} / {:error, reason} shape; opts pass through to Req.

Summary

Functions

Gets a user by username.

Gets the authenticated user.

Lists email addresses for the authenticated user.

Lists users followed by a user.

Auto-paginates the authenticated user's email addresses into a lazy Stream.

Auto-paginates a user's followers into a lazy Stream (see GhEx.REST.stream/3).

Auto-paginates the users a user follows into a lazy Stream.

Functions

get(client, username, opts \\ [])

Gets a user by username.

get_authenticated(client, opts \\ [])

@spec get_authenticated(
  GhEx.Client.t(),
  keyword()
) :: GhEx.REST.result()

Gets the authenticated user.

list_emails(client, opts \\ [])

@spec list_emails(
  GhEx.Client.t(),
  keyword()
) :: GhEx.REST.result()

Lists email addresses for the authenticated user.

list_followers(client, username, opts \\ [])

@spec list_followers(GhEx.Client.t(), String.t(), keyword()) :: GhEx.REST.result()

Lists followers of a user.

list_following(client, username, opts \\ [])

@spec list_following(GhEx.Client.t(), String.t(), keyword()) :: GhEx.REST.result()

Lists users followed by a user.

stream_emails(client, opts \\ [])

@spec stream_emails(
  GhEx.Client.t(),
  keyword()
) :: Enumerable.t()

Auto-paginates the authenticated user's email addresses into a lazy Stream.

stream_followers(client, username, opts \\ [])

@spec stream_followers(GhEx.Client.t(), String.t(), keyword()) :: Enumerable.t()

Auto-paginates a user's followers into a lazy Stream (see GhEx.REST.stream/3).

stream_following(client, username, opts \\ [])

@spec stream_following(GhEx.Client.t(), String.t(), keyword()) :: Enumerable.t()

Auto-paginates the users a user follows into a lazy Stream.