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

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 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 custom repository roles in an organization

List failed organization invitations

List fine-grained permissions for an organization

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 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

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

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

Create a custom role

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

Link to this function

delete_custom_role(org, role_id, opts \\ [])

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

Delete a custom role

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.t()} | {:error, GitHub.Error.t()}

Get an organization

resources

Resources

Link to this function

get_custom_role(org, role_id, opts \\ [])

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

Get a custom role

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_custom_roles(organization_id, opts \\ [])

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

List custom repository roles in an organization

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

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

List fine-grained permissions for an organization

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_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.

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

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.t()} | {:error, GitHub.Error.t()}

Update an organization

resources

Resources

Link to this function

update_custom_role(org, role_id, body, opts \\ [])

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

Update a custom role

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_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