View Source GitHub.Orgs (GitHub REST API Client v0.0.11)

Provides API endpoints related to orgs

Link to this section Summary

Functions

Block a user from an organization

Cancel an organization invitation

Check if a user is blocked by an organization

Check organization membership for a user

Check public organization membership for a user

Convert an organization member to outside collaborator

Create an organization invitation

Create an organization webhook

Delete an organization

Delete an organization webhook

Get an organization

Get an organization membership for the authenticated user

Get organization membership for a user

Get an organization webhook

Get a webhook configuration for an organization

Get a webhook delivery for an organization webhook

List organizations

List app installations for an organization

List users blocked by an organization

List failed organization invitations

List organizations for the authenticated user

List organizations for a user

List organization invitation teams

List organization members

List organization memberships for the authenticated user

List outside collaborators for an organization

List repositories a fine-grained personal access token has access to

List repositories requested to be accessed by a fine-grained personal access token

List requests to access organization resources with fine-grained personal access tokens

List fine-grained personal access tokens with access to organization resources

List pending organization invitations

List public organization members

List security manager teams

List deliveries for an organization webhook

List organization webhooks

Ping an organization webhook

Redeliver a delivery for an organization webhook

Remove an organization member

Remove organization membership for a user

Remove outside collaborator from an organization

Remove public organization membership for the authenticated user

Review a request to access organization resources with a fine-grained personal access token

Review requests to access organization resources with fine-grained personal access tokens

Set organization membership for a user

Set public organization membership for the authenticated user

Unblock a user from an organization

Update an organization

Update an organization membership for the authenticated user

Update the access a fine-grained personal access token has to organization resources

Update the access to organization resources via fine-grained personal access tokens

Update an organization webhook

Update a webhook configuration for an organization

Link to this section Functions

Link to this function

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

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

Add a security manager team

resources

Resources

Link to this function

block_user(org, username, opts \\ [])

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

Block a user from an organization

resources

Resources

Link to this function

cancel_invitation(org, invitation_id, opts \\ [])

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

Cancel an organization invitation

resources

Resources

Link to this function

check_blocked_user(org, username, opts \\ [])

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

Check if a user is blocked by an organization

resources

Resources

Link to this function

check_membership_for_user(org, username, opts \\ [])

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

Check organization membership for a user

resources

Resources

Link to this function

check_public_membership_for_user(org, username, opts \\ [])

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

Check public organization membership for a user

resources

Resources

Link to this function

convert_member_to_outside_collaborator(org, username, body, opts \\ [])

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

Convert an organization member to outside collaborator

resources

Resources

Link to this function

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

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

Create an organization invitation

resources

Resources

Link to this function

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

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

Create an organization webhook

resources

Resources

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

Delete an organization

resources

Resources

Link to this function

delete_webhook(org, hook_id, opts \\ [])

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

Delete an organization webhook

resources

Resources

Link to this function

enable_or_disable_security_product_on_all_org_repos(org, security_product, enablement, opts \\ [])

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

Enable or disable a security feature for an organization

resources

Resources

@spec get(
  String.t(),
  keyword()
) :: {:ok, GitHub.Organization.full()} | {:error, GitHub.Error.t()}

Get an organization

resources

Resources

Link to this function

get_membership_for_authenticated_user(org, opts \\ [])

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

Get an organization membership for the authenticated user

resources

Resources

Link to this function

get_membership_for_user(org, username, opts \\ [])

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

Get organization membership for a user

resources

Resources

Link to this function

get_webhook(org, hook_id, opts \\ [])

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

Get an organization webhook

resources

Resources

Link to this function

get_webhook_config_for_org(org, hook_id, opts \\ [])

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

Get a webhook configuration for an organization

resources

Resources

Link to this function

get_webhook_delivery(org, hook_id, delivery_id, opts \\ [])

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

Get a webhook delivery for an organization webhook

resources

Resources

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

List organizations

options

Options

  • since (integer): An organization ID. Only return organizations 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_app_installations(org, opts \\ [])

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

List app installations for an organization

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

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

List users blocked by an organization

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

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

List failed organization 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_for_authenticated_user(opts \\ [])

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

List organizations 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_for_user(username, opts \\ [])

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

List organizations 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_invitation_teams(org, invitation_id, opts \\ [])

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

List organization invitation 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_members(org, opts \\ [])

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

List organization members

options

Options

  • filter (String.t()): Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
  • role (String.t()): Filter members returned by their role.
  • 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_memberships_for_authenticated_user(opts \\ [])

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

List organization memberships for the authenticated user

options

Options

  • state (String.t()): Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships.
  • 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_outside_collaborators(org, opts \\ [])

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

List outside collaborators for an organization

options

Options

  • filter (String.t()): Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
  • 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_pat_grant_repositories(org, pat_id, opts \\ [])

View Source
@spec list_pat_grant_repositories(String.t(), integer(), keyword()) ::
  {:ok, [GitHub.Repository.minimal()]} | {:error, GitHub.Error.t()}

List repositories a fine-grained personal access token has access to

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

View Source
@spec list_pat_grant_request_repositories(String.t(), integer(), keyword()) ::
  {:ok, [GitHub.Repository.minimal()]} | {:error, GitHub.Error.t()}

List repositories requested to be accessed by a fine-grained personal access token

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

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

List requests to access organization resources with fine-grained personal access tokens

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.
  • sort (String.t()): The property by which to sort the results.
  • direction (String.t()): The direction to sort the results by.
  • owner ([String.t()]): A list of owner usernames to use to filter the results.
  • repository (String.t()): The name of the repository to use to filter the results.
  • permission (String.t()): The permission to use to filter the results.
  • last_used_before (String.t()): Only show fine-grained personal access tokens used before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • last_used_after (String.t()): Only show fine-grained personal access tokens used after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

resources

Resources

Link to this function

list_pat_grants(org, opts \\ [])

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

List fine-grained personal access tokens with access to organization resources

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.
  • sort (String.t()): The property by which to sort the results.
  • direction (String.t()): The direction to sort the results by.
  • owner ([String.t()]): A list of owner usernames to use to filter the results.
  • repository (String.t()): The name of the repository to use to filter the results.
  • permission (String.t()): The permission to use to filter the results.
  • last_used_before (String.t()): Only show fine-grained personal access tokens used before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • last_used_after (String.t()): Only show fine-grained personal access tokens used after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

resources

Resources

Link to this function

list_pending_invitations(org, opts \\ [])

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

List pending organization invitations

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.
  • role (String.t()): Filter invitations by their member role.
  • invitation_source (String.t()): Filter invitations by their invitation source.

resources

Resources

Link to this function

list_public_members(org, opts \\ [])

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

List public organization members

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

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

List security manager teams

resources

Resources

Link to this function

list_webhook_deliveries(org, hook_id, opts \\ [])

View Source
@spec list_webhook_deliveries(String.t(), integer(), keyword()) ::
  {:ok, [GitHub.Hook.DeliveryItem.t()]} | {:error, GitHub.Error.t()}

List deliveries for an organization webhook

options

Options

  • per_page (integer): The number of results per page (max 100).
  • cursor (String.t()): Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.
  • redelivery (boolean):

resources

Resources

Link to this function

list_webhooks(org, opts \\ [])

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

List organization webhooks

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

ping_webhook(org, hook_id, opts \\ [])

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

Ping an organization webhook

resources

Resources

Link to this function

redeliver_webhook_delivery(org, hook_id, delivery_id, opts \\ [])

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

Redeliver a delivery for an organization webhook

resources

Resources

Link to this function

remove_member(org, username, opts \\ [])

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

Remove an organization member

resources

Resources

Link to this function

remove_membership_for_user(org, username, opts \\ [])

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

Remove organization membership for a user

resources

Resources

Link to this function

remove_outside_collaborator(org, username, opts \\ [])

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

Remove outside collaborator from an organization

resources

Resources

Link to this function

remove_public_membership_for_authenticated_user(org, username, opts \\ [])

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

Remove public organization membership for the authenticated user

resources

Resources

Link to this function

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

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

Remove a security manager team

resources

Resources

Link to this function

review_pat_grant_request(org, pat_request_id, body, opts \\ [])

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

Review a request to access organization resources with a fine-grained personal access token

resources

Resources

Link to this function

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

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

Review requests to access organization resources with fine-grained personal access tokens

resources

Resources

Link to this function

set_membership_for_user(org, username, body, opts \\ [])

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

Set organization membership for a user

resources

Resources

Link to this function

set_public_membership_for_authenticated_user(org, username, opts \\ [])

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

Set public organization membership for the authenticated user

resources

Resources

Link to this function

unblock_user(org, username, opts \\ [])

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

Unblock a user from an organization

resources

Resources

Link to this function

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

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

Update an organization

resources

Resources

Link to this function

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

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

Update an organization membership for the authenticated user

resources

Resources

Link to this function

update_pat_access(org, pat_id, body, opts \\ [])

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

Update the access a fine-grained personal access token has to organization resources

resources

Resources

Link to this function

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

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

Update the access to organization resources via fine-grained personal access tokens

resources

Resources

Link to this function

update_webhook(org, hook_id, body, opts \\ [])

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

Update an organization webhook

resources

Resources

Link to this function

update_webhook_config_for_org(org, hook_id, body, opts \\ [])

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

Update a webhook configuration for an organization

resources

Resources