/// <summary> /// Creates a new <see cref="GpgKey"/> for the authenticated user. /// </summary> /// <param name="newGpgKey">The new GPG key to add.</param> /// <remarks> /// 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> public Task<GpgKey> Create(NewGpgKey newGpgKey) { Ensure.ArgumentNotNull(newGpgKey, "newGpgKey"); return ApiConnection.Post<GpgKey>(ApiUrls.GpgKeys(), newGpgKey, AcceptHeaders.GpgKeysPreview); }
public Task <GpgKey> Create(NewGpgKey newGpgKey) { Ensure.ArgumentNotNull(newGpgKey, nameof(newGpgKey)); return(ApiConnection.Post <GpgKey>(ApiUrls.GpgKeys(), newGpgKey)); }
/// <summary> /// Creates a new <see cref="GpgKey"/> for the authenticated user. /// </summary> /// <param name="newGpgKey">The new GPG key to add.</param> /// <remarks> /// 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> public Task <GpgKey> Create(NewGpgKey newGpgKey) { Ensure.ArgumentNotNull(newGpgKey, "newGpgKey"); return(ApiConnection.Post <GpgKey>(ApiUrls.GpgKeys(), newGpgKey, AcceptHeaders.GpgKeysPreview)); }