Files
octokit.net/Octokit.Reactive/Clients/IObservableGistsClient.cs
Timothy Haagenson f172edef5b [WIP] Gists get Commits and Forks
- [ ] Finish Gists API Implementation
- [ ] [Add method to get gist
commits](https://developer.github.com/v3/gists/#list-gist-commits)
- [ ] [Add method to get gist
forks](https://developer.github.com/v3/gists/#list-gist-forks)

Fixes #328, Fixes #216

Added implementation for the remaining pieces of the Gists API.  The
others mentioned in #328 and #216 were completed through other PRs.
2014-07-21 13:41:34 -05:00

177 lines
6.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
namespace Octokit.Reactive
{
public interface IObservableGistsClient
{
IObservableGistCommentsClient Comment { get; set; }
/// <summary>
/// Gets a gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#get-a-single-gist
/// </remarks>
/// <param name="id">The id of the gist</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable<Gist> Get(string id);
/// <summary>
/// List the authenticated users gists or if called anonymously,
/// this will return all public gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
IObservable<Gist> GetAll();
/// <summary>
/// List the authenticated users gists or if called anonymously,
/// this will return all public gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
/// <param name="since">Only gists updated at or after this time are returned</param>
IObservable<Gist> GetAll(DateTimeOffset since);
/// <summary>
/// Lists all public gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
IObservable<Gist> GetAllPublic();
/// <summary>
/// Lists all public gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
/// <param name="since">Only gists updated at or after this time are returned</param>
IObservable<Gist> GetAllPublic(DateTimeOffset since);
/// <summary>
/// List the authenticated users starred gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
IObservable<Gist> GetAllStarred();
/// <summary>
/// List the authenticated users starred gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
/// <param name="since">Only gists updated at or after this time are returned</param>
IObservable<Gist> GetAllStarred(DateTimeOffset since);
/// <summary>
/// List a user's gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
/// <param name="user">The user</param>
IObservable<Gist> GetAllForUser(string user);
/// <summary>
/// List a user's gists
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists
/// </remarks>
/// <param name="user">The user</param>
/// <param name="since">Only gists updated at or after this time are returned</param>
IObservable<Gist> GetAllForUser(string user, DateTimeOffset since);
/// <summary>
/// List gist commits
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists-commits
/// </remarks>
/// <param name="id">The id of the gist</param>
IObservable<GistHistory> GetCommits(string id);
/// <summary>
/// List gist forks
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#list-gists-forks
/// </remarks>
/// <param name="id">The id of the gist</param>
IObservable<GistFork> GetForks(string id);
/// <summary>
/// Creates a new gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#create-a-gist
/// </remarks>
/// <param name="newGist">The new gist to create</param>
IObservable<Gist> Create(NewGist newGist);
/// <summary>
/// Creates a fork of a gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#fork-a-gist
/// </remarks>
/// <param name="id">The id of the gist to fork</param>
IObservable<Gist> Fork(string id);
/// <summary>
/// Edits a gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#delete-a-gist
/// </remarks>
/// <param name="id">The id of the gist</param>
/// <param name="gistUpdate">The update to the gist</param>
IObservable<Gist> Edit(string id, GistUpdate gistUpdate);
/// <summary>
/// Deletes a gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#delete-a-gist
/// </remarks>
/// <param name="id">The id of the gist</param>
IObservable<Unit> Delete(string id);
/// <summary>
/// Stars a gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#star-a-gist
/// </remarks>
/// <param name="id">The id of the gist</param>
IObservable<Unit> Star(string id);
/// <summary>
/// Unstars a gist
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#unstar-a-gist
/// </remarks>
/// <param name="id">The id of the gist</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Unstar")]
IObservable<Unit> Unstar(string id);
/// <summary>
/// Checks if the gist is starred
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/gists/#check-if-a-gist-is-starred
/// </remarks>
/// <param name="id">The id of the gist</param>
IObservable<bool> IsStarred(string id);
}
}