using System;
namespace Octokit.Reactive
{
///
/// A client for GitHub Applications API.
///
///
/// See the GitHub Apps API documentation for more information.
///
public interface IObservableGitHubAppsClient
{
///
/// Access GitHub's Apps Installations API.
///
///
/// Refer to the API documentation for more information: https://developer.github.com/v3/apps/installations/
///
IObservableGitHubAppInstallationsClient Installation { get; }
///
/// Get a single GitHub App (if private, requires Personal Access Token or GitHubApp auth)
///
/// https://developer.github.com/v3/apps/#get-a-single-github-app
/// The URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App.
IObservable Get(string slug);
///
/// Returns the GitHub App associated with the authentication credentials used (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#get-the-authenticated-github-app
IObservable GetCurrent();
///
/// List installations of the authenticated GitHub App (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#find-installations
IObservable GetAllInstallationsForCurrent();
///
/// List installations of the authenticated GitHub App (requires GitHubApp auth).
///
/// Options for changing the API response
/// https://developer.github.com/v3/apps/#find-installations
IObservable GetAllInstallationsForCurrent(ApiOptions options);
///
/// Get a single GitHub App Installation (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#get-a-single-installation
/// The Id of the GitHub App Installation
[Obsolete("This method will be removed in a future release. Please use GetInstallationForCurrent() instead")]
IObservable GetInstallation(long installationId);
///
/// Get a single GitHub App Installation (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#get-a-single-installation
/// The Id of the GitHub App Installation
IObservable GetInstallationForCurrent(long installationId);
///
/// List installations for the currently authenticated user (requires GitHubApp User-To-Server Auth).
///
/// https://developer.github.com/v3/apps/#list-installations-for-user
IObservable GetAllInstallationsForCurrentUser();
///
/// List installations for the currently authenticated user (requires GitHubApp User-To-Server Auth).
///
/// https://developer.github.com/v3/apps/#list-installations-for-user
IObservable GetAllInstallationsForCurrentUser(ApiOptions options);
///
/// Create a time bound access token for a GitHubApp Installation that can be used to access other API endpoints (requires GitHubApp auth).
///
///
/// https://developer.github.com/v3/apps/#create-a-new-installation-token
/// https://developer.github.com/apps/building-github-apps/authentication-options-for-github-apps/#authenticating-as-an-installation
/// https://developer.github.com/v3/apps/available-endpoints/
///
/// The Id of the GitHub App Installation
IObservable CreateInstallationToken(long installationId);
///
/// Enables an authenticated GitHub App to find the organization's installation information (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#find-organization-installation
/// The name of the organization
IObservable GetOrganizationInstallationForCurrent(string organization);
///
/// Enables an authenticated GitHub App to find the repository's installation information (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#find-repository-installation
/// The owner of the repo
/// The name of the repo
IObservable GetRepositoryInstallationForCurrent(string owner, string repo);
///
/// Enables an authenticated GitHub App to find the repository's installation information (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#find-repository-installation
/// The Id of the repository
IObservable GetRepositoryInstallationForCurrent(long repositoryId);
///
/// Enables an authenticated GitHub App to find the users's installation information (requires GitHubApp auth).
///
/// https://developer.github.com/v3/apps/#find-user-installation
/// The name of the user
IObservable GetUserInstallationForCurrent(string user);
}
}