From c26a3d17a280314ab94c48b5fe6f2347a115f0ef Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Sat, 4 Jun 2016 21:53:35 +1000 Subject: [PATCH] Use ReactionsPreview accepts header in the observable client --- .../Clients/ObservableIssueCommentsClient.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs index 37b4bccd..afa1a77c 100644 --- a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs @@ -7,6 +7,9 @@ namespace Octokit.Reactive { public class ObservableIssueCommentsClient : IObservableIssueCommentsClient { + //TODO: Remove this once PR #1335 has been merged + public const string ReactionsPreview = "application/vnd.github.squirrel-girl-preview"; + readonly IIssueCommentsClient _client; readonly IConnection _connection; @@ -63,7 +66,8 @@ namespace Octokit.Reactive Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(options, "options"); - return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name), options); + //TODO: Use AcceptHeaders.ReactionsPreview once PR #1335 has been merged + return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name), null, ReactionsPreview, options); } /// @@ -97,7 +101,8 @@ namespace Octokit.Reactive Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(options, "options"); - return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name, number), options); + //TODO: Use AcceptHeaders.ReactionsPreview once PR #1335 has been merged + return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name, number), null, ReactionsPreview, options); } ///