public static Releases ( long repositoryId ) : |
||
repositoryId | long | The Id of the repository |
Результат |
/// <summary> /// Edits an existing <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#edit-a-release">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="id">The id of the release</param> /// <param name="data">A description of the release to edit</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<Release> Edit(long repositoryId, int id, ReleaseUpdate data) { Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Releases(repositoryId, id); return ApiConnection.Patch<Release>(endpoint, data); }
/// <summary> /// Gets all <see cref="Release"/>s for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="options">Options for changing the API response</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<IReadOnlyList<Release>> GetAll(long repositoryId, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); var endpoint = ApiUrls.Releases(repositoryId); return ApiConnection.GetAll<Release>(endpoint, null, AcceptHeaders.StableVersion, options); }
/// <summary> /// Creates a new <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#create-a-release">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="data">A description of the release to create</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<Release> Create(long repositoryId, NewRelease data) { Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Releases(repositoryId); return ApiConnection.Post<Release>(endpoint, data, AcceptHeaders.StableVersion); }
public Task <Release> Get(long repositoryId, string tag) { Ensure.ArgumentNotNullOrEmptyString(tag, nameof(tag)); var endpoint = ApiUrls.Releases(repositoryId, tag); return(ApiConnection.Get <Release>(endpoint)); }
/// <summary> /// Gets a single <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#get-a-single-release">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <param name="id">The id of the release</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<Release> Get(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); var endpoint = ApiUrls.Releases(owner, name, id); return ApiConnection.Get<Release>(endpoint); }
/// <summary> /// Gets all <see cref="Release"/>s for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>The list of <see cref="Release"/>s for the specified repository.</returns> public Task <IReadOnlyList <Release> > GetAll(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "repository"); var endpoint = ApiUrls.Releases(owner, name); return(ApiConnection.GetAll <Release>(endpoint, null, "application/vnd.github.v3")); }
/// <summary> /// Deletes an existing <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#delete-a-release">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <param name="id">The id of the release to delete</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns></returns> public Task DeleteRelease(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); var endpoint = ApiUrls.Releases(owner, name, id); return(ApiConnection.Delete(endpoint)); }
public Task <Release> Get(string owner, string name, long id) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); var endpoint = ApiUrls.Releases(owner, name, id); return(ApiConnection.Get <Release>(endpoint)); }
/// <summary> /// Gets all <see cref="Release"/>s for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <param name="options">Options for changing the API response</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<IReadOnlyList<Release>> GetAll(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(options, "options"); var endpoint = ApiUrls.Releases(owner, name); return ApiConnection.GetAll<Release>(endpoint, null, AcceptHeaders.StableVersion, options); }
/// <summary> /// Edits an existing <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#edit-a-release">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <param name="id">The id of the release</param> /// <param name="data">A description of the release to edit</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<Release> Edit(string owner, string name, int id, ReleaseUpdate data) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Releases(owner, name, id); return ApiConnection.Patch<Release>(endpoint, data); }
/// <summary> /// Creates a new <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#create-a-release">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <param name="data">A description of the release to create</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task<Release> Create(string owner, string name, NewRelease data) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Releases(owner, name); return ApiConnection.Post<Release>(endpoint, data, AcceptHeaders.StableVersion); }
/// <summary> /// Gets all <see cref="Release"/>s for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>The list of <see cref="Release"/>s for the specified repository.</returns> public Task <IReadOnlyList <Release> > GetAll(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "repository"); var endpoint = ApiUrls.Releases(owner, name); return(ApiConnection.GetAll <Release>(endpoint, null, AcceptHeaders.StableVersion)); }
/// <summary> /// Creates a new <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#create-a-release">API documentation</a> for more information. /// </remarks> /// <param name="owner">The repository's owner</param> /// <param name="name">The repository's name</param> /// <param name="data">A description of the release to create</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>The created <see cref="Release"/>.</returns> public Task <Release> CreateRelease(string owner, string name, ReleaseUpdate data) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "repository"); Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Releases(owner, name); return(ApiConnection.Post <Release>(endpoint, data, "application/vnd.github.v3")); }
/// <summary> /// Deletes an existing <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#delete-a-release">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="id">The id of the release to delete</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task Delete(long repositoryId, int id) { var endpoint = ApiUrls.Releases(repositoryId, id); return(ApiConnection.Delete(endpoint)); }
/// <summary> /// Gets a single <see cref="Release"/> for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#get-a-single-release">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="id">The id of the release</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task <Release> Get(long repositoryId, int id) { var endpoint = ApiUrls.Releases(repositoryId, id); return(ApiConnection.Get <Release>(endpoint)); }