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

Provides API endpoints related to apps

Link to this section Summary

Functions

Create a GitHub App from a manifest

Create an installation access token for an app

Delete an installation for the authenticated app

Get the authenticated app

Get an installation for the authenticated app

Get an organization installation for the authenticated app

Get a repository installation for the authenticated app

Get a subscription plan for an account

Get a subscription plan for an account (stubbed)

Get a user installation for the authenticated app

Get a webhook configuration for an app

Get a delivery for an app webhook

List accounts for a plan (stubbed)

List repositories accessible to the user access token

List installation requests for the authenticated app

List installations for the authenticated app

List app installations accessible to the user access token

List plans (stubbed)

List repositories accessible to the app installation

List subscriptions for the authenticated user

List subscriptions for the authenticated user (stubbed)

List deliveries for an app webhook

Redeliver a delivery for an app webhook

Revoke an installation access token

Create a scoped access token

Update a webhook configuration for an app

Link to this section Functions

Link to this function

add_repo_to_installation_for_authenticated_user(installation_id, repository_id, opts \\ [])

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

Add a repository to an app installation

resources

Resources

Link to this function

check_token(client_id, body, opts \\ [])

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

Check a token

resources

Resources

Link to this function

create_from_manifest(code, opts \\ [])

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

Create a GitHub App from a manifest

resources

Resources

Link to this function

create_installation_access_token(installation_id, body, opts \\ [])

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

Create an installation access token for an app

resources

Resources

Link to this function

delete_authorization(client_id, body, opts \\ [])

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

Delete an app authorization

resources

Resources

Link to this function

delete_installation(installation_id, opts \\ [])

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

Delete an installation for the authenticated app

resources

Resources

Link to this function

delete_token(client_id, body, opts \\ [])

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

Delete an app token

resources

Resources

Link to this function

get_authenticated(opts \\ [])

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

Get the authenticated app

resources

Resources

Link to this function

get_by_slug(app_slug, opts \\ [])

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

Get an app

resources

Resources

Link to this function

get_installation(installation_id, opts \\ [])

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

Get an installation for the authenticated app

resources

Resources

Link to this function

get_org_installation(org, opts \\ [])

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

Get an organization installation for the authenticated app

resources

Resources

Link to this function

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

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

Get a repository installation for the authenticated app

resources

Resources

Link to this function

get_subscription_plan_for_account(account_id, opts \\ [])

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

Get a subscription plan for an account

resources

Resources

Link to this function

get_subscription_plan_for_account_stubbed(account_id, opts \\ [])

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

Get a subscription plan for an account (stubbed)

resources

Resources

Link to this function

get_user_installation(username, opts \\ [])

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

Get a user installation for the authenticated app

resources

Resources

Link to this function

get_webhook_config_for_app(opts \\ [])

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

Get a webhook configuration for an app

resources

Resources

Link to this function

get_webhook_delivery(delivery_id, opts \\ [])

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

Get a delivery for an app webhook

resources

Resources

Link to this function

list_accounts_for_plan(plan_id, opts \\ [])

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

List accounts for a plan

options

Options

  • sort (String.t()): The property to sort the results by.
  • direction (String.t()): To return the oldest accounts first, set to asc. Ignored without the sort parameter.
  • 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_accounts_for_plan_stubbed(plan_id, opts \\ [])

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

List accounts for a plan (stubbed)

options

Options

  • sort (String.t()): The property to sort the results by.
  • direction (String.t()): To return the oldest accounts first, set to asc. Ignored without the sort parameter.
  • 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_installation_repos_for_authenticated_user(installation_id, opts \\ [])

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

List repositories accessible to the user 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_installation_requests_for_authenticated_app(opts \\ [])

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

List installation requests for the authenticated app

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_installations(opts \\ [])

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

List installations for the authenticated app

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.
  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • outdated (String.t()):

resources

Resources

Link to this function

list_installations_for_authenticated_user(opts \\ [])

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

List app installations accessible to the user 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

@spec list_plans(keyword()) ::
  {:ok, [GitHub.Marketplace.ListingPlan.t()]} | {:error, GitHub.Error.t()}

List plans

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_plans_stubbed(opts \\ [])

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

List plans (stubbed)

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_accessible_to_installation(opts \\ [])

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

List repositories accessible to the app installation

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_subscriptions_for_authenticated_user(opts \\ [])

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

List subscriptions 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_subscriptions_for_authenticated_user_stubbed(opts \\ [])

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

List subscriptions for the authenticated user (stubbed)

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_webhook_deliveries(opts \\ [])

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

List deliveries for an app 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

redeliver_webhook_delivery(delivery_id, opts \\ [])

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

Redeliver a delivery for an app webhook

resources

Resources

Link to this function

remove_repo_from_installation_for_authenticated_user(installation_id, repository_id, opts \\ [])

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

Remove a repository from an app installation

resources

Resources

Link to this function

reset_token(client_id, body, opts \\ [])

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

Reset a token

resources

Resources

Link to this function

revoke_installation_access_token(opts \\ [])

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

Revoke an installation access token

resources

Resources

Link to this function

scope_token(client_id, body, opts \\ [])

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

Create a scoped access token

resources

Resources

Link to this function

suspend_installation(installation_id, opts \\ [])

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

Suspend an app installation

resources

Resources

Link to this function

unsuspend_installation(installation_id, opts \\ [])

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

Unsuspend an app installation

resources

Resources

Link to this function

update_webhook_config_for_app(body, opts \\ [])

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

Update a webhook configuration for an app

resources

Resources