GhEx.Teams (gh_ex v0.3.1)

Copy Markdown View Source

Convenience functions for the GitHub Teams REST API.

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

Summary

Functions

Creates a team in an organization. attrs is the JSON body (name, description, ...).

Lists teams in an organization.

Functions

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

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

Creates a team in an organization. attrs is the JSON body (name, description, ...).

get_by_slug(client, org, slug, opts \\ [])

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

Gets a team by slug.

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

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

Lists teams in an organization.

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

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

Lists members of a team.