GhEx.Organizations (gh_ex v0.3.3)

Copy Markdown View Source

Convenience functions for the GitHub Organizations 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 an organization.

Lists organizations for the authenticated user.

Lists members of an organization.

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

Auto-paginates an organization's members into a lazy Stream.

Updates an organization. attrs is the JSON body.

Functions

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

Gets an organization.

list_for_authenticated_user(client, opts \\ [])

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

Lists organizations for the authenticated user.

list_members(client, org, opts \\ [])

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

Lists members of an organization.

stream_for_authenticated_user(client, opts \\ [])

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

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

stream_members(client, org, opts \\ [])

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

Auto-paginates an organization's members into a lazy Stream.

update(client, org, attrs, opts \\ [])

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

Updates an organization. attrs is the JSON body.