Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.35 KB

apps.md

File metadata and controls

57 lines (42 loc) · 1.35 KB

Applications API

Back to the navigation

Wraps GitHub Applications API.

Create a new installation token

For the installation id 123 use the following:

$token = $client->api('apps')->createInstallationToken(123);

To create an access token on behalf of a user with id 456 use:

$token = $client->api('apps')->createInstallationToken(123, 456);

Find all installations

Find all installations for the authenticated application.

$installations = $client->api('apps')->findInstallations();

Find installations for a user

$installations = $client->api('current_user')->installations();

List repositories

List repositories that are accessible to the authenticated installation.

$repositories = $client->api('apps')->listRepositories($userId);

List repositories for a given installation and user

$repositories = $client->api('current_user')->repositoriesByInstallation($installationId, $parameters);

Add repository to installation

$client->api('apps')->addRepository($installationId, $repositoryId);

Remove repository from installation

$client->api('apps')->removeRepository($installationId, $repositoryId);

Get authenticated app

$authenticatedApp = $client->api('apps')->getAuthenticatedApp();