using System; using System.Diagnostics.CodeAnalysis; using System.Reactive; namespace Octokit.Reactive { /// /// A client for GitHub's Releases API. /// /// /// See the Releases API documentation for more information. /// public interface IObservableReleasesClient { /// /// Gets all s for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// Thrown when a general API error occurs. /// IObservable GetAll(string owner, string name); /// /// Gets all s for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// Thrown when a general API error occurs. /// IObservable GetAll(int repositoryId); /// /// Gets all s for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// Options for changing the API response /// Thrown when a general API error occurs. /// IObservable GetAll(string owner, string name, ApiOptions options); /// /// Gets all s for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// Options for changing the API response /// Thrown when a general API error occurs. /// IObservable GetAll(int repositoryId, ApiOptions options); /// /// Gets a single for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the release /// Thrown when a general API error occurs. /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] IObservable Get(string owner, string name, int id); /// /// Gets a single for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the release /// Thrown when a general API error occurs. /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] IObservable Get(int repositoryId, int id); /// /// Gets the latest for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// Thrown when a general API error occurs. /// IObservable GetLatest(string owner, string name); /// /// Gets the latest for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// Thrown when a general API error occurs. /// IObservable GetLatest(int repositoryId); /// /// Creates a new for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// A description of the release to create /// Thrown when a general API error occurs. /// IObservable Create(string owner, string name, NewRelease data); /// /// Creates a new for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// A description of the release to create /// Thrown when a general API error occurs. /// IObservable Create(int repositoryId, NewRelease data); /// /// Edits an existing for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the release /// A description of the release to edit /// Thrown when a general API error occurs. /// IObservable Edit(string owner, string name, int id, ReleaseUpdate data); /// /// Edits an existing for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the release /// A description of the release to edit /// Thrown when a general API error occurs. /// IObservable Edit(int repositoryId, int id, ReleaseUpdate data); /// /// Deletes an existing for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the release to delete /// Thrown when a general API error occurs. /// IObservable Delete(string owner, string name, int id); /// /// Deletes an existing for the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the release to delete /// Thrown when a general API error occurs. /// IObservable Delete(int repositoryId, int id); /// /// Gets all for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the . /// Thrown when a general API error occurs. /// IObservable GetAllAssets(string owner, string name, int id); /// /// Gets all for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the . /// Thrown when a general API error occurs. /// IObservable GetAllAssets(int repositoryId, int id); /// /// Gets all for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the . /// Options for changing the API response /// Thrown when a general API error occurs. /// IObservable GetAllAssets(string owner, string name, int id, ApiOptions options); /// /// Gets all for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the . /// Options for changing the API response /// Thrown when a general API error occurs. /// IObservable GetAllAssets(int repositoryId, int id, ApiOptions options); /// /// Uploads a for the specified release. /// /// /// See the API documentation for more information. /// /// The to attach the uploaded asset to /// Description of the asset with its data /// Thrown when a general API error occurs. /// IObservable UploadAsset(Release release, ReleaseAssetUpload data); /// /// Gets the specified for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the /// IObservable GetAsset(string owner, string name, int assetId); /// /// Gets the specified for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the /// IObservable GetAsset(int repositoryId, int assetId); /// /// Edits the for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the /// Description of the asset with its amended data /// IObservable EditAsset(string owner, string name, int assetId, ReleaseAssetUpdate data); /// /// Edits the for the specified release of the specified repository. /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the /// Description of the asset with its amended data /// IObservable EditAsset(int repositoryId, int assetId, ReleaseAssetUpdate data); /// /// Deletes the specified from the specified repository /// /// /// See the API documentation for more information. /// /// The repository's owner /// The repository's name /// The id of the . /// IObservable DeleteAsset(string owner, string name, int id); /// /// Deletes the specified from the specified repository /// /// /// See the API documentation for more information. /// /// The repository's ID /// The id of the . /// IObservable DeleteAsset(int repositoryId, int id); } }