mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
add metadata to each client action (#2124)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user