View Source GitHub.Apps (GitHub REST API Client v0.0.4)
Provides API endpoints related to apps
Link to this section Summary
Functions
Add a repository to an app installation
Check a token
Create a GitHub App from a manifest
Create an installation access token for an app
Delete an app authorization
Delete an installation for the authenticated app
Delete an app token
Get the authenticated app
Get an 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
List accounts for a plan (stubbed)
List repositories accessible to the user access token
List installations for the authenticated app
List app installations accessible to the user access token
List plans
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
Remove a repository from an app installation
Reset a token
Revoke an installation access token
Create a scoped access token
Suspend an app installation
Unsuspend an app installation
Update a webhook configuration for an app
Link to this section Functions
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
@spec check_token(String.t(), map(), keyword()) :: {:ok, GitHub.Authorization.t()} | {:error, GitHub.Error.t()}
Check a token
resources
Resources
@spec create_from_manifest( String.t(), keyword() ) :: {:ok, map()} | {:error, GitHub.Error.t()}
Create a GitHub App from a manifest
resources
Resources
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
@spec delete_authorization(String.t(), map(), keyword()) :: :ok | {:error, GitHub.Error.t()}
Delete an app authorization
resources
Resources
@spec delete_installation( integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Delete an installation for the authenticated app
resources
Resources
@spec delete_token(String.t(), map(), keyword()) :: :ok | {:error, GitHub.Error.t()}
Delete an app token
resources
Resources
@spec get_authenticated(keyword()) :: {:ok, GitHub.Integration.t()} | {:error, GitHub.Error.t()}
Get the authenticated app
resources
Resources
@spec get_by_slug( String.t(), keyword() ) :: {:ok, GitHub.Integration.t()} | {:error, GitHub.Error.t()}
Get an app
resources
Resources
@spec get_installation( integer(), keyword() ) :: {:ok, GitHub.Installation.t()} | {:error, GitHub.Error.t()}
Get an installation for the authenticated app
resources
Resources
@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
@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
@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
@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
@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
@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
@spec get_webhook_delivery( integer(), keyword() ) :: {:ok, GitHub.Hook.Delivery.t()} | {:error, GitHub.Error.t()}
Get a delivery for an app webhook
resources
Resources
@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.created
means when the repository was starred.updated
means when the repository was last pushed to.direction
(String.t()): To return the oldest accounts first, set toasc
. Ignored without thesort
parameter.per_page
(integer): The number of results per page (max 100).page
(integer): Page number of the results to fetch.
resources
Resources
@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.created
means when the repository was starred.updated
means when the repository was last pushed to.direction
(String.t()): To return the oldest accounts first, set toasc
. Ignored without thesort
parameter.per_page
(integer): The number of results per page (max 100).page
(integer): Page number of the results to fetch.
resources
Resources
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
@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
@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
@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
@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
@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
@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
@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 thelink
header for the next and previous page cursors.redelivery
(boolean):
resources
Resources
@spec redeliver_webhook_delivery( integer(), keyword() ) :: {:ok, map()} | {:error, GitHub.Error.t()}
Redeliver a delivery for an app webhook
resources
Resources
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
@spec reset_token(String.t(), map(), keyword()) :: {:ok, GitHub.Authorization.t()} | {:error, GitHub.Error.t()}
Reset a token
resources
Resources
@spec revoke_installation_access_token(keyword()) :: :ok | {:error, GitHub.Error.t()}
Revoke an installation access token
resources
Resources
@spec scope_token(String.t(), map(), keyword()) :: {:ok, GitHub.Authorization.t()} | {:error, GitHub.Error.t()}
Create a scoped access token
resources
Resources
@spec suspend_installation( integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Suspend an app installation
resources
Resources
@spec unsuspend_installation( integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Unsuspend an app installation
resources
Resources
@spec update_webhook_config_for_app( map(), keyword() ) :: {:ok, GitHub.Webhook.Config.t()} | {:error, GitHub.Error.t()}
Update a webhook configuration for an app