View Source GitHub.Interactions (GitHub REST API Client v0.3.3)

Provides API endpoints related to interactions

Link to this section Summary

Functions

Get interaction restrictions for your public repositories

Get interaction restrictions for an organization

Get interaction restrictions for a repository

Remove interaction restrictions from your public repositories

Remove interaction restrictions for an organization

Remove interaction restrictions for a repository

Set interaction restrictions for your public repositories

Set interaction restrictions for an organization

Set interaction restrictions for a repository

Link to this section Types

Link to this type

get_restrictions_for_authenticated_user_200_json_resp()

View Source
@type get_restrictions_for_authenticated_user_200_json_resp() :: %{__info__: map()}
Link to this type

get_restrictions_for_org_200_json_resp()

View Source
@type get_restrictions_for_org_200_json_resp() :: %{__info__: map()}
Link to this type

get_restrictions_for_repo_200_json_resp()

View Source
@type get_restrictions_for_repo_200_json_resp() :: %{__info__: map()}

Link to this section Functions

Link to this function

get_restrictions_for_authenticated_user(opts \\ [])

View Source
@spec get_restrictions_for_authenticated_user(keyword()) ::
  {:ok, map() | GitHub.Interaction.Limit.Response.t()}
  | {:error, GitHub.Error.t()}

Get interaction restrictions for your public repositories

Shows which type of GitHub user can interact with your public repositories and when the restriction expires.

resources

Resources

Link to this function

get_restrictions_for_org(org, opts \\ [])

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

Get interaction restrictions for an organization

Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.

resources

Resources

Link to this function

get_restrictions_for_repo(owner, repo, opts \\ [])

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

Get interaction restrictions for a repository

Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.

resources

Resources

Link to this function

remove_restrictions_for_authenticated_user(opts \\ [])

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

Remove interaction restrictions from your public repositories

Removes any interaction restrictions from your public repositories.

resources

Resources

Link to this function

remove_restrictions_for_org(org, opts \\ [])

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

Remove interaction restrictions for an organization

Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.

resources

Resources

Link to this function

remove_restrictions_for_repo(owner, repo, opts \\ [])

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

Remove interaction restrictions for a repository

Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a 409 Conflict response and will not be able to use this endpoint to change the interaction limit for a single repository.

resources

Resources

Link to this function

set_restrictions_for_authenticated_user(body, opts \\ [])

View Source
@spec set_restrictions_for_authenticated_user(
  GitHub.Interaction.Limit.t(),
  keyword()
) :: {:ok, GitHub.Interaction.Limit.Response.t()} | {:error, GitHub.Error.t()}

Set interaction restrictions for your public repositories

Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.

resources

Resources

Link to this function

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

View Source
@spec set_restrictions_for_org(String.t(), GitHub.Interaction.Limit.t(), keyword()) ::
  {:ok, GitHub.Interaction.Limit.Response.t()} | {:error, GitHub.Error.t()}

Set interaction restrictions for an organization

Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.

resources

Resources

Link to this function

set_restrictions_for_repo(owner, repo, body, opts \\ [])

View Source
@spec set_restrictions_for_repo(
  String.t(),
  String.t(),
  GitHub.Interaction.Limit.t(),
  keyword()
) ::
  {:ok, GitHub.Interaction.Limit.Response.t()} | {:error, GitHub.Error.t()}

Set interaction restrictions for a repository

Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a 409 Conflict response and will not be able to use this endpoint to change the interaction limit for a single repository.

resources

Resources