Files
octokit.net/Octokit.Reactive/Clients/IObservableStarredClient.cs
Ryan Gribble 3c818934b8 Release v0.24 - A Sight For Sore Eyes (#1539)
* Add release notes and bump version to 0.24

* run "build FormatCode" to fix up whitespace/formatting issues

* Fix failing Ssh key tests due to "validation exception".  This key must be in use on github (under another user, most likely from these tests failing).  Changed to a new SSH key and tweaked tests to reduce chance of a key being created and not destroyed

* Assignee and Assignees cant both be specified on NewIssue.  We missed this one in the PR.  Marked Assignee as [Obsolete] and fixed tests to use Assignees

* Fix a couple of Reactions tests that were calling the wrong client methods

* Fix timeline tests - looks like the response class has changed shape a bit, it now has an Issue object in the payload and Id field isnt present (leaving Id field there in case other timeline events do use it)

* Fix some following tests that require the test user to follow more than 1 other user

* Unskip these Event tests now because apparently they work!

* add breaking changes notes

* Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)

* return null if ApiError.Message is empty or whitespace

* Uncomment test, which now passes

* update release notes to include PR1540

* Add "Bot" AccountType, was causing a deserialization exception when running the integration test "SearchForExcludedLanguage" (#1541)

* Update to include PR1541

* add bullets to make release notes easier to read

* markup additional code mentions in notes

* Fix grammar

fields => field
2017-01-17 18:56:55 +10:00

218 lines
12 KiB
C#

using System;
namespace Octokit.Reactive
{
/// <summary>
/// A client for GitHub's Activity Starring API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/activity/starring/">Activity Starring API documentation</a> for more information.
/// </remarks>
public interface IObservableStarredClient
{
/// <summary>
/// Retrieves all of the stargazers for the passed repository
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<User> GetAllStargazers(string owner, string name);
/// <summary>
/// Retrieves all of the stargazers for the passed repository
/// </summary>
/// <param name="repositoryId">The Id of the repository</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<User> GetAllStargazers(long repositoryId);
/// <summary>
/// Retrieves all of the stargazers for the passed repository
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<User> GetAllStargazers(string owner, string name, ApiOptions options);
/// <summary>
/// Retrieves all of the stargazers for the passed repository
/// </summary>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<User> GetAllStargazers(long repositoryId, ApiOptions options);
/// <summary>
/// Retrieves all of the stargazers for the passed repository with star creation timestamps.
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<UserStar> GetAllStargazersWithTimestamps(string owner, string name);
/// <summary>
/// Retrieves all of the stargazers for the passed repository with star creation timestamps.
/// </summary>
/// <param name="repositoryId">The Id of the repository</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<UserStar> GetAllStargazersWithTimestamps(long repositoryId);
/// <summary>
/// Retrieves all of the stargazers for the passed repository with star creation timestamps.
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<UserStar> GetAllStargazersWithTimestamps(string owner, string name, ApiOptions options);
/// <summary>
/// Retrieves all of the stargazers for the passed repository with star creation timestamps.
/// </summary>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<UserStar> GetAllStargazersWithTimestamps(long repositoryId, ApiOptions options);
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForCurrent();
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForCurrent(ApiOptions options);
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user with star creation timestamps.
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForCurrentWithTimestamps();
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user with star creation timestamps.
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForCurrentWithTimestamps(ApiOptions options);
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user
/// </summary>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForCurrent(StarredRequest request);
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user
/// </summary>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForCurrent(StarredRequest request, ApiOptions options);
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user with star creation timestamps.
/// </summary>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForCurrentWithTimestamps(StarredRequest request);
/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user with star creation timestamps.
/// </summary>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForCurrentWithTimestamps(StarredRequest request, ApiOptions options);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user
/// </summary>
/// <param name="user">The login of the user</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForUser(string user);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForUser(string user, ApiOptions options);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user with star creation timestamps.
/// </summary>
/// <param name="user">The login of the user</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForUserWithTimestamps(string user);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user with star creation timestamps.
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForUserWithTimestamps(string user, ApiOptions options);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForUser(string user, StarredRequest request);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForUser(string user, StarredRequest request, ApiOptions options);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user with star creation timestamps.
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForUserWithTimestamps(string user, StarredRequest request);
/// <summary>
/// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user with star creation timestamps.
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="request">Star-specific request parameters that sort the results</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForUserWithTimestamps(string user, StarredRequest request, ApiOptions options);
/// <summary>
/// Check if a repository is starred by the current authenticated user
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<bool> CheckStarred(string owner, string name);
/// <summary>
/// Stars a repository for the authenticated user
/// </summary>
/// <param name="owner">The owner of the repository to star</param>
/// <param name="name">The name of the repository to star</param>
IObservable<bool> StarRepo(string owner, string name);
/// <summary>
/// Unstars a repository for the authenticated user
/// </summary>
/// <param name="owner">The owner of the repository to unstar</param>
/// <param name="name">The name of the repository to unstar</param>
IObservable<bool> RemoveStarFromRepo(string owner, string name);
}
}