using System;
using System.Diagnostics.CodeAnalysis;
namespace Octokit.Reactive
{
///
/// A client for GitHub's Watching API.
///
///
/// See the Watching API documentation for more information.
///
public interface IObservableWatchedClient
{
///
/// Retrieves all of the watchers for the passed repository
///
/// The owner of the repository
/// The name of the repository
/// Thrown if the client is not authenticated
IObservable GetAllWatchers(string owner, string name);
///
/// Retrieves all of the watchers for the passed repository
///
/// The Id of the repository
/// Thrown if the client is not authenticated
IObservable GetAllWatchers(int repositoryId);
///
/// Retrieves all of the watchers for the passed repository
///
/// The owner of the repository
/// The name of the repository
/// Options for changing the API's response.
/// Thrown if the client is not authenticated
IObservable GetAllWatchers(string owner, string name, ApiOptions options);
///
/// Retrieves all of the watchers for the passed repository
///
/// The Id of the repository
/// Options for changing the API's response.
/// Thrown if the client is not authenticated
IObservable GetAllWatchers(int repositoryId, ApiOptions options);
///
/// Retrieves all of the watched (ies) for the current user
///
/// Thrown if the client is not authenticated
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable GetAllForCurrent();
///
/// Retrieves all of the watched (ies) for the current user
///
/// Options for changing the API's response.
/// Thrown if the client is not authenticated
IObservable GetAllForCurrent(ApiOptions options);
///
/// Retrieves all of the (ies) watched by the specified user
///
/// The login of the user
/// Thrown if the client is not authenticated
IObservable GetAllForUser(string user);
///
/// Retrieves all of the (ies) watched by the specified user
///
/// The login of the user
/// Options for changing the API's response.
/// Thrown if the client is not authenticated
IObservable GetAllForUser(string user, ApiOptions options);
///
/// Check if a repository is watched by the current authenticated user
///
/// The owner of the repository
/// The name of the repository
/// Thrown if the client is not authenticated
IObservable CheckWatched(string owner, string name);
///
/// Check if a repository is watched by the current authenticated user
///
/// The Id of the repository
/// Thrown if the client is not authenticated
IObservable CheckWatched(int repositoryId);
///
/// Stars a repository for the authenticated user.
///
/// The owner of the repository to star
/// The name of the repository to star
/// A instance describing the new subscription to create
IObservable WatchRepo(string owner, string name, NewSubscription newSubscription);
///
/// Stars a repository for the authenticated user.
///
/// The Id of the repository
/// A instance describing the new subscription to create
IObservable WatchRepo(int repositoryId, NewSubscription newSubscription);
///
/// Unstars a repository for the authenticated user.
///
/// The owner of the repository to unstar
/// The name of the repository to unstar
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Unwatch",
Justification = "Unwatch is consistent with the GitHub website")]
IObservable UnwatchRepo(string owner, string name);
///
/// Unstars a repository for the authenticated user.
///
/// The Id of the repository
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Unwatch",
Justification = "Unwatch is consistent with the GitHub website")]
IObservable UnwatchRepo(int repositoryId);
}
}