From 0bbf3d2b40fb1f8ea637ae5c3a21d6da5ec04664 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Sun, 5 Jun 2016 11:17:35 +1000 Subject: [PATCH] Forgot to pass the preview accept header --- Octokit/Clients/UserGpgKeysClient.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Octokit/Clients/UserGpgKeysClient.cs b/Octokit/Clients/UserGpgKeysClient.cs index f7a940e6..5feeac2f 100644 --- a/Octokit/Clients/UserGpgKeysClient.cs +++ b/Octokit/Clients/UserGpgKeysClient.cs @@ -43,6 +43,8 @@ namespace Octokit /// A of s for the current user. public Task> GetAllForCurrent(ApiOptions options) { + Ensure.ArgumentNotNull(options, "options"); + return ApiConnection.GetAll(ApiUrls.GpgKeys(), null, AcceptHeaders.GpgKeysPreview, options); } @@ -69,7 +71,9 @@ namespace Octokit /// The newly created . public Task Create(NewGpgKey newGpgKey) { - return ApiConnection.Post(ApiUrls.GpgKeys(), newGpgKey); + Ensure.ArgumentNotNull(newGpgKey, "newGpgKey"); + + return ApiConnection.Post(ApiUrls.GpgKeys(), newGpgKey, AcceptHeaders.GpgKeysPreview); } /// @@ -82,7 +86,7 @@ namespace Octokit /// public Task Delete(int id) { - return ApiConnection.Delete(ApiUrls.GpgKeys(id)); + return ApiConnection.Delete(ApiUrls.GpgKeys(id), null, AcceptHeaders.GpgKeysPreview); } } } \ No newline at end of file