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. /// The list of s for the specified repository. IObservable GetAll(string owner, string name); /// /// 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. /// The list of s for the specified repository. IObservable GetAll(string owner, string name, 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. /// The specified by the id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] IObservable Get(string owner, string name, 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. /// The latest specified by the repository IObservable GetLatest(string owner, string name); /// /// 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. /// The created . IObservable Create(string owner, string name, 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. /// The updated . IObservable Edit(string owner, string name, 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); /// /// 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. /// The list of for the specified release of the specified repository. 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 owner /// The repository's name /// The id of the . /// Options for changing the API response /// Thrown when a general API error occurs. /// The list of for the specified release of the specified repository. IObservable GetAllAssets(string owner, string name, 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. /// The created . 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 /// The specified by the asset id. IObservable GetAsset(string owner, string name, 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 /// The edited . IObservable EditAsset(string owner, string name, 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); } }