add metadata to each client action (#2124)

This commit is contained in:
Brendan Forster
2020-03-04 21:10:38 -04:00
committed by GitHub
parent a2b0d87ce8
commit f96885654f
79 changed files with 1178 additions and 78 deletions
+6 -1
View File
@@ -28,6 +28,7 @@ namespace Octokit
/// See the <a href="https://developer.github.com/v3/users/gpg_keys/#list-your-gpg-keys">API documentation</a> for more information.
/// </remarks>
/// <returns>A <see cref="IReadOnlyList{GpgKey}"/> of <see cref="GpgKey"/>s for the current user.</returns>
[ManualRoute("GET", "/user/gpg_keys")]
public Task<IReadOnlyList<GpgKey>> GetAllForCurrent()
{
return GetAllForCurrent(ApiOptions.None);
@@ -41,6 +42,7 @@ namespace Octokit
/// See the <a href="https://developer.github.com/v3/users/gpg_keys/#list-your-gpg-keys">API documentation</a> for more information.
/// </remarks>
/// <returns>A <see cref="IReadOnlyList{GpgKey}"/> of <see cref="GpgKey"/>s for the current user.</returns>
[ManualRoute("GET", "/user/gpg_keys")]
public Task<IReadOnlyList<GpgKey>> GetAllForCurrent(ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));
@@ -56,6 +58,7 @@ namespace Octokit
/// See the <a href="https://developer.github.com/v3/users/gpg_keys/#get-a-single-gpg-key">API documentation</a> for more information.
/// </remarks>
/// <returns>The <see cref="GpgKey"/> for the specified Id.</returns>
[ManualRoute("GET", "/user/gpg_keys/{id}")]
public Task<GpgKey> Get(int id)
{
return ApiConnection.Get<GpgKey>(ApiUrls.GpgKeys(id), null, AcceptHeaders.GpgKeysPreview);
@@ -69,6 +72,7 @@ namespace Octokit
/// See the <a href="https://developer.github.com/v3/users/gpg_keys/#create-a-gpg-key">API documentation</a> for more information.
/// </remarks>
/// <returns>The newly created <see cref="GpgKey"/>.</returns>
[ManualRoute("POST", "/user/gpg_keys")]
public Task<GpgKey> Create(NewGpgKey newGpgKey)
{
Ensure.ArgumentNotNull(newGpgKey, nameof(newGpgKey));
@@ -84,9 +88,10 @@ namespace Octokit
/// See the <a href="https://developer.github.com/v3/users/gpg_keys/#delete-a-gpg-key">API documentation</a> for more information.
/// </remarks>
/// <returns></returns>
[ManualRoute("DELETE", "/user/gpg_keys/{id}")]
public Task Delete(int id)
{
return ApiConnection.Delete(ApiUrls.GpgKeys(id), new object(), AcceptHeaders.GpgKeysPreview);
}
}
}
}