using System; using System.Diagnostics.CodeAnalysis; using System.Reactive; namespace Octokit.Reactive { /// /// A client for GitHub's References API. /// /// /// See the References API documentation for more information. /// public interface IObservableReferencesClient { /// /// Gets a reference for a given repository by reference name /// /// /// http://developer.github.com/v3/git/refs/#get-a-reference /// /// The owner of the repository /// The name of the repository /// The canonical name of the reference without the 'refs/' prefix. e.g. "heads/master" or "tags/release-1" /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] IObservable Get(string owner, string name, string reference); /// /// Gets a reference for a given repository by reference name /// /// /// http://developer.github.com/v3/git/refs/#get-a-reference /// /// The Id of the repository /// The canonical name of the reference without the 'refs/' prefix. e.g. "heads/master" or "tags/release-1" /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] IObservable Get(long repositoryId, string reference); /// /// Gets all references for a given repository /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The owner of the repository /// The name of the repository /// IObservable GetAll(string owner, string name); /// /// Gets all references for a given repository /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The owner of the repository /// The name of the repository /// Options for changing the API response /// IObservable GetAll(string owner, string name, ApiOptions options); /// /// Gets all references for a given repository /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The Id of the repository /// IObservable GetAll(long repositoryId); /// /// Gets all references for a given repository /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The Id of the repository /// Options for changing the API response /// IObservable GetAll(long repositoryId, ApiOptions options); /// /// Gets references for a given repository by sub-namespace, i.e. "tags" or "heads" /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The owner of the repository /// The name of the repository /// The sub-namespace to get references for /// IObservable GetAllForSubNamespace(string owner, string name, string subNamespace); /// /// Gets references for a given repository by sub-namespace, i.e. "tags" or "heads" /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The owner of the repository /// The name of the repository /// The sub-namespace to get references for /// Options for changing the API response /// IObservable GetAllForSubNamespace(string owner, string name, string subNamespace, ApiOptions options); /// /// Gets references for a given repository by sub-namespace, i.e. "tags" or "heads" /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The Id of the repository /// The sub-namespace to get references for /// IObservable GetAllForSubNamespace(long repositoryId, string subNamespace); /// /// Gets references for a given repository by sub-namespace, i.e. "tags" or "heads" /// /// /// http://developer.github.com/v3/git/refs/#get-all-references /// /// The Id of the repository /// The sub-namespace to get references for /// Options for changing the API response /// IObservable GetAllForSubNamespace(long repositoryId, string subNamespace, ApiOptions options); /// /// Creates a reference for a given repository /// /// /// http://developer.github.com/v3/git/refs/#create-a-reference /// /// The owner of the repository /// The name of the repository /// The reference to create /// IObservable Create(string owner, string name, NewReference reference); /// /// Creates a reference for a given repository /// /// /// http://developer.github.com/v3/git/refs/#create-a-reference /// /// The Id of the repository /// The reference to create /// IObservable Create(long repositoryId, NewReference reference); /// /// Updates a reference for a given repository by reference name /// /// /// http://developer.github.com/v3/git/refs/#update-a-reference /// /// The owner of the repository /// The name of the repository /// The canonical name of the reference without the 'refs/' prefix. e.g. "heads/master" or "tags/release-1" /// The updated reference data /// IObservable Update(string owner, string name, string reference, ReferenceUpdate referenceUpdate); /// /// Updates a reference for a given repository by reference name /// /// /// http://developer.github.com/v3/git/refs/#update-a-reference /// /// The Id of the repository /// The canonical name of the reference without the 'refs/' prefix. e.g. "heads/master" or "tags/release-1" /// The updated reference data /// IObservable Update(long repositoryId, string reference, ReferenceUpdate referenceUpdate); /// /// Deletes a reference for a given repository by reference name /// /// /// http://developer.github.com/v3/git/refs/#delete-a-reference /// /// The owner of the repository /// The name of the repository /// The canonical name of the reference without the 'refs/' prefix. e.g. "heads/master" or "tags/release-1" /// IObservable Delete(string owner, string name, string reference); /// /// Deletes a reference for a given repository by reference name /// /// /// http://developer.github.com/v3/git/refs/#delete-a-reference /// /// The Id of the repository /// The canonical name of the reference without the 'refs/' prefix. e.g. "heads/master" or "tags/release-1" /// IObservable Delete(long repositoryId, string reference); } }