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

Provides API endpoints related to teams

Link to this section Summary

Functions

Add or update team membership for a user (Legacy)

Add or update team repository permissions (Legacy)

Check team permissions for a project (Legacy)

Check team permissions for a repository (Legacy)

Delete a team (Legacy)

Get a team (Legacy)

Get team membership for a user (Legacy)

List child teams (Legacy)

List teams for the authenticated user

List team members (Legacy)

List pending team invitations (Legacy)

List team projects (Legacy)

List team repositories (Legacy)

Remove team membership for a user (Legacy)

Remove a project from a team (Legacy)

Remove a repository from a team (Legacy)

Link to this section Functions

Link to this function

add_member_legacy(team_id, username, opts \\ [])

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

Add team member (Legacy)

resources

Resources

Link to this function

add_or_update_membership_for_user_in_org(org, team_slug, username, body, opts \\ [])

View Source
@spec add_or_update_membership_for_user_in_org(
  String.t(),
  String.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Team.Membership.t()} | {:error, GitHub.Error.t()}

Add or update team membership for a user

resources

Resources

Link to this function

add_or_update_membership_for_user_legacy(team_id, username, body, opts \\ [])

View Source
@spec add_or_update_membership_for_user_legacy(
  integer(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Team.Membership.t()} | {:error, GitHub.Error.t()}

Add or update team membership for a user (Legacy)

resources

Resources

Link to this function

add_or_update_project_permissions_in_org(org, team_slug, project_id, body, opts \\ [])

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

Add or update team project permissions

resources

Resources

Link to this function

add_or_update_project_permissions_legacy(team_id, project_id, body, opts \\ [])

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

Add or update team project permissions (Legacy)

resources

Resources

Link to this function

add_or_update_repo_permissions_in_org(org, team_slug, owner, repo, body, opts \\ [])

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

Add or update team repository permissions

resources

Resources

Link to this function

add_or_update_repo_permissions_legacy(team_id, owner, repo, body, opts \\ [])

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

Add or update team repository permissions (Legacy)

resources

Resources

Link to this function

check_permissions_for_project_in_org(org, team_slug, project_id, opts \\ [])

View Source
@spec check_permissions_for_project_in_org(
  String.t(),
  String.t(),
  integer(),
  keyword()
) ::
  {:ok, GitHub.Team.Project.t()} | {:error, GitHub.Error.t()}

Check team permissions for a project

resources

Resources

Link to this function

check_permissions_for_project_legacy(team_id, project_id, opts \\ [])

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

Check team permissions for a project (Legacy)

resources

Resources

Link to this function

check_permissions_for_repo_in_org(org, team_slug, owner, repo, opts \\ [])

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

Check team permissions for a repository

resources

Resources

Link to this function

check_permissions_for_repo_legacy(team_id, owner, repo, opts \\ [])

View Source
@spec check_permissions_for_repo_legacy(integer(), String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Team.Repository.t()} | {:error, GitHub.Error.t()}

Check team permissions for a repository (Legacy)

resources

Resources

Link to this function

create(org, body, opts \\ [])

View Source
@spec create(String.t(), map(), keyword()) ::
  {:ok, GitHub.Team.Full.t()} | {:error, GitHub.Error.t()}

Create a team

resources

Resources

Link to this function

create_discussion_comment_in_org(org, team_slug, discussion_number, body, opts \\ [])

View Source
@spec create_discussion_comment_in_org(
  String.t(),
  String.t(),
  integer(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Team.DiscussionComment.t()} | {:error, GitHub.Error.t()}

Create a discussion comment

resources

Resources

Link to this function

create_discussion_comment_legacy(team_id, discussion_number, body, opts \\ [])

View Source
@spec create_discussion_comment_legacy(integer(), integer(), map(), keyword()) ::
  {:ok, GitHub.Team.DiscussionComment.t()} | {:error, GitHub.Error.t()}

Create a discussion comment (Legacy)

resources

Resources

Link to this function

create_discussion_in_org(org, team_slug, body, opts \\ [])

View Source
@spec create_discussion_in_org(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.Team.Discussion.t()} | {:error, GitHub.Error.t()}

Create a discussion

resources

Resources

Link to this function

create_discussion_legacy(team_id, body, opts \\ [])

View Source
@spec create_discussion_legacy(integer(), map(), keyword()) ::
  {:ok, GitHub.Team.Discussion.t()} | {:error, GitHub.Error.t()}

Create a discussion (Legacy)

resources

Resources

Link to this function

delete_discussion_comment_in_org(org, team_slug, discussion_number, comment_number, opts \\ [])

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

Delete a discussion comment

resources

Resources

Link to this function

delete_discussion_comment_legacy(team_id, discussion_number, comment_number, opts \\ [])

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

Delete a discussion comment (Legacy)

resources

Resources

Link to this function

delete_discussion_in_org(org, team_slug, discussion_number, opts \\ [])

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

Delete a discussion

resources

Resources

Link to this function

delete_discussion_legacy(team_id, discussion_number, opts \\ [])

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

Delete a discussion (Legacy)

resources

Resources

Link to this function

delete_in_org(org, team_slug, opts \\ [])

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

Delete a team

resources

Resources

Link to this function

delete_legacy(team_id, opts \\ [])

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

Delete a team (Legacy)

resources

Resources

Link to this function

get_by_name(org, team_slug, opts \\ [])

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

Get a team by name

resources

Resources

Link to this function

get_discussion_comment_in_org(org, team_slug, discussion_number, comment_number, opts \\ [])

View Source
@spec get_discussion_comment_in_org(
  String.t(),
  String.t(),
  integer(),
  integer(),
  keyword()
) ::
  {:ok, GitHub.Team.DiscussionComment.t()} | {:error, GitHub.Error.t()}

Get a discussion comment

resources

Resources

Link to this function

get_discussion_comment_legacy(team_id, discussion_number, comment_number, opts \\ [])

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

Get a discussion comment (Legacy)

resources

Resources

Link to this function

get_discussion_in_org(org, team_slug, discussion_number, opts \\ [])

View Source
@spec get_discussion_in_org(String.t(), String.t(), integer(), keyword()) ::
  {:ok, GitHub.Team.Discussion.t()} | {:error, GitHub.Error.t()}

Get a discussion

resources

Resources

Link to this function

get_discussion_legacy(team_id, discussion_number, opts \\ [])

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

Get a discussion (Legacy)

resources

Resources

Link to this function

get_legacy(team_id, opts \\ [])

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

Get a team (Legacy)

resources

Resources

Link to this function

get_member_legacy(team_id, username, opts \\ [])

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

Get team member (Legacy)

resources

Resources

Link to this function

get_membership_for_user_in_org(org, team_slug, username, opts \\ [])

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

Get team membership for a user

resources

Resources

Link to this function

get_membership_for_user_legacy(team_id, username, opts \\ [])

View Source
@spec get_membership_for_user_legacy(integer(), String.t(), keyword()) ::
  {:ok, GitHub.Team.Membership.t()} | {:error, GitHub.Error.t()}

Get team membership for a user (Legacy)

resources

Resources

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

List teams

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_child_in_org(org, team_slug, opts \\ [])

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

List child teams

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_child_legacy(team_id, opts \\ [])

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

List child teams (Legacy)

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_discussion_comments_in_org(org, team_slug, discussion_number, opts \\ [])

View Source
@spec list_discussion_comments_in_org(String.t(), String.t(), integer(), keyword()) ::
  {:ok, [GitHub.Team.DiscussionComment.t()]} | {:error, GitHub.Error.t()}

List discussion comments

options

Options

  • direction (String.t()): The direction to sort the results by.
  • 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_discussion_comments_legacy(team_id, discussion_number, opts \\ [])

View Source
@spec list_discussion_comments_legacy(integer(), integer(), keyword()) ::
  {:ok, [GitHub.Team.DiscussionComment.t()]} | {:error, GitHub.Error.t()}

List discussion comments (Legacy)

options

Options

  • direction (String.t()): The direction to sort the results by.
  • 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_discussions_in_org(org, team_slug, opts \\ [])

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

List discussions

options

Options

  • direction (String.t()): The direction to sort the results by.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.
  • pinned (String.t()): Pinned discussions only filter

resources

Resources

Link to this function

list_discussions_legacy(team_id, opts \\ [])

View Source
@spec list_discussions_legacy(
  integer(),
  keyword()
) :: {:ok, [GitHub.Team.Discussion.t()]} | {:error, GitHub.Error.t()}

List discussions (Legacy)

options

Options

  • direction (String.t()): The direction to sort the results by.
  • 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_for_authenticated_user(opts \\ [])

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

List teams 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_members_in_org(org, team_slug, opts \\ [])

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

List team members

options

Options

  • role (String.t()): Filters members returned by their role in the team.
  • 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_members_legacy(team_id, opts \\ [])

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

List team members (Legacy)

options

Options

  • role (String.t()): Filters members returned by their role in the team.
  • 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_pending_invitations_in_org(org, team_slug, opts \\ [])

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

List pending team invitations

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_pending_invitations_legacy(team_id, opts \\ [])

View Source
@spec list_pending_invitations_legacy(
  integer(),
  keyword()
) :: {:ok, [GitHub.Organization.Invitation.t()]} | {:error, GitHub.Error.t()}

List pending team invitations (Legacy)

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_projects_in_org(org, team_slug, opts \\ [])

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

List team projects

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_projects_legacy(team_id, opts \\ [])

View Source
@spec list_projects_legacy(
  integer(),
  keyword()
) :: {:ok, [GitHub.Team.Project.t()]} | {:error, GitHub.Error.t()}

List team projects (Legacy)

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_repos_in_org(org, team_slug, opts \\ [])

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

List team repositories

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_repos_legacy(team_id, opts \\ [])

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

List team repositories (Legacy)

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

remove_member_legacy(team_id, username, opts \\ [])

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

Remove team member (Legacy)

resources

Resources

Link to this function

remove_membership_for_user_in_org(org, team_slug, username, opts \\ [])

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

Remove team membership for a user

resources

Resources

Link to this function

remove_membership_for_user_legacy(team_id, username, opts \\ [])

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

Remove team membership for a user (Legacy)

resources

Resources

Link to this function

remove_project_in_org(org, team_slug, project_id, opts \\ [])

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

Remove a project from a team

resources

Resources

Link to this function

remove_project_legacy(team_id, project_id, opts \\ [])

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

Remove a project from a team (Legacy)

resources

Resources

Link to this function

remove_repo_in_org(org, team_slug, owner, repo, opts \\ [])

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

Remove a repository from a team

resources

Resources

Link to this function

remove_repo_legacy(team_id, owner, repo, opts \\ [])

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

Remove a repository from a team (Legacy)

resources

Resources

Link to this function

update_discussion_comment_in_org(org, team_slug, discussion_number, comment_number, body, opts \\ [])

View Source
@spec update_discussion_comment_in_org(
  String.t(),
  String.t(),
  integer(),
  integer(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Team.DiscussionComment.t()} | {:error, GitHub.Error.t()}

Update a discussion comment

resources

Resources

Link to this function

update_discussion_comment_legacy(team_id, discussion_number, comment_number, body, opts \\ [])

View Source
@spec update_discussion_comment_legacy(
  integer(),
  integer(),
  integer(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Team.DiscussionComment.t()} | {:error, GitHub.Error.t()}

Update a discussion comment (Legacy)

resources

Resources

Link to this function

update_discussion_in_org(org, team_slug, discussion_number, body, opts \\ [])

View Source
@spec update_discussion_in_org(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.Team.Discussion.t()} | {:error, GitHub.Error.t()}

Update a discussion

resources

Resources

Link to this function

update_discussion_legacy(team_id, discussion_number, body, opts \\ [])

View Source
@spec update_discussion_legacy(integer(), integer(), map(), keyword()) ::
  {:ok, GitHub.Team.Discussion.t()} | {:error, GitHub.Error.t()}

Update a discussion (Legacy)

resources

Resources

Link to this function

update_in_org(org, team_slug, body, opts \\ [])

View Source
@spec update_in_org(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.Team.Full.t()} | {:error, GitHub.Error.t()}

Update a team

resources

Resources

Link to this function

update_legacy(team_id, body, opts \\ [])

View Source
@spec update_legacy(integer(), map(), keyword()) ::
  {:ok, GitHub.Team.Full.t()} | {:error, GitHub.Error.t()}

Update a team (Legacy)

resources

Resources