From 470d289fa331bf64f410b33ac19d7b17da9f1419 Mon Sep 17 00:00:00 2001 From: James R Sconfitto Date: Wed, 13 Nov 2013 21:54:26 -0500 Subject: [PATCH] Add the observable starred client interface --- .../Clients/IObservableStarredClient.cs | 73 +++++++++++++++++++ Octokit.Reactive/Octokit.Reactive.csproj | 1 + 2 files changed, 74 insertions(+) create mode 100644 Octokit.Reactive/Clients/IObservableStarredClient.cs diff --git a/Octokit.Reactive/Clients/IObservableStarredClient.cs b/Octokit.Reactive/Clients/IObservableStarredClient.cs new file mode 100644 index 00000000..df4a269f --- /dev/null +++ b/Octokit.Reactive/Clients/IObservableStarredClient.cs @@ -0,0 +1,73 @@ +using System; + +namespace Octokit.Reactive +{ + public interface IObservableStarredClient + { + /// + /// Retrieves all of the stargazers for the passed repository. + /// + /// The owner of the repository + /// The name of the repository + /// Thrown if the client is not authenticated. + /// A of . + IObservable GetAllStargazers(string owner, string name); + + /// + /// Retrieves all of the starred (ies) for the current user. + /// + /// Thrown if the client is not authenticated. + /// A of . + IObservable GetAllForCurrent(); + + /// + /// Retrieves all of the starred (ies) for the current user. + /// + /// Star-specific request parameters that sort the results + /// Thrown if the client is not authenticated. + /// A of . + IObservable GetAllForCurrent(StarredRequest request); + + /// + /// Retrieves all of the (ies) starred by the specified user. + /// + /// The login of the user + /// Thrown if the client is not authenticated. + /// A starred by the specified user. + IObservable GetAllForUser(string user); + + /// + /// Retrieves all of the (ies) starred by the specified user. + /// + /// The login of the user + /// Star-specific request parameters that sort the results + /// Thrown if the client is not authenticated. + /// A starred by the specified user. + IObservable GetAllForUser(string user, StarredRequest request); + + /// + /// Check if a repository is starred by the current authenticated user. + /// + /// The owner of the repository + /// The name of the repository + /// Thrown if the client is not authenticated. + /// A bool representing the success of the operation + IObservable CheckStarred(string owner, string name); + + /// + /// Stars a repository for the authenticated user. + /// + /// The owner of the repository to star + /// The name of the repository to star + /// A bool representing the success of starring + IObservable StarRepo(string owner, string name); + + /// + /// Unstars a repository for the authenticated user. + /// + /// The owner of the repository to unstar + /// The name of the repository to unstar + /// A bool representing the success of the operation + IObservable RemoveStarFromRepo(string owner, string name); + } +} diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index 6561cf94..b9df22ed 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -76,6 +76,7 @@ +