public static Asset ( long repositoryId, int id ) : |
||
repositoryId | long | The Id of the repository |
id | int | The id of the release asset |
return |
/// <summary> /// Edits the <see cref="ReleaseAsset"/> for the specified release of the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#edit-a-release-asset">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="assetId">The id of the <see cref="ReleaseAsset"/></param> /// <param name="data">Description of the asset with its amended data</param> public Task<ReleaseAsset> EditAsset(long repositoryId, int assetId, ReleaseAssetUpdate data) { Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Asset(repositoryId, assetId); return ApiConnection.Patch<ReleaseAsset>(endpoint, data); }
/// <summary> /// Deletes the specified <see cref="ReleaseAsset"/> from the specified repository /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#delete-a-release-asset">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 <see cref="ReleaseAsset"/>.</param> public Task DeleteAsset(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); var endpoint = ApiUrls.Asset(owner, name, id); return ApiConnection.Delete(endpoint); }
/// <summary> /// Gets the specified <see cref="ReleaseAsset"/> for the specified release of the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#get-a-single-release-asset">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="assetId">The id of the <see cref="ReleaseAsset"/></param> public Task<ReleaseAsset> GetAsset(string owner, string name, int assetId) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); var endpoint = ApiUrls.Asset(owner, name, assetId); return ApiConnection.Get<ReleaseAsset>(endpoint); }
/// <summary> /// Edits the <see cref="ReleaseAsset"/> for the specified release of the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#edit-a-release-asset">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="assetId">The id of the <see cref="ReleaseAsset"/></param> /// <param name="data">Description of the asset with its amended data</param> public Task<ReleaseAsset> EditAsset(string owner, string name, int assetId, ReleaseAssetUpdate data) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(data, "data"); var endpoint = ApiUrls.Asset(owner, name, assetId); return ApiConnection.Patch<ReleaseAsset>(endpoint, data); }
/// <summary> /// Deletes the specified <see cref="ReleaseAsset"/> from the specified repository /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#delete-a-release-asset">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="id">The id of the <see cref="ReleaseAsset"/>.</param> public Task DeleteAsset(long repositoryId, int id) { var endpoint = ApiUrls.Asset(repositoryId, id); return(ApiConnection.Delete(endpoint)); }
/// <summary> /// Gets the specified <see cref="ReleaseAsset"/> for the specified release of the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/releases/#get-a-single-release-asset">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="assetId">The id of the <see cref="ReleaseAsset"/></param> public Task <ReleaseAsset> GetAsset(long repositoryId, int assetId) { var endpoint = ApiUrls.Asset(repositoryId, assetId); return(ApiConnection.Get <ReleaseAsset>(endpoint)); }