public string GetChangeTweetReplyVisibilityQuery(IChangeTweetReplyVisibilityV2Parameters parameters)
        {
            var query = new StringBuilder($"https://api.twitter.com/2/tweets/{parameters.Id}/hidden");

            query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters);
            return(query.ToString());
        }
Exemple #2
0
        public Task <ITwitterResult <TweetHideV2Response> > ChangeTweetReplyVisibilityAsync(IChangeTweetReplyVisibilityV2Parameters parameters, ITwitterRequest request)
        {
            var content = new TweetHideStateV2
            {
                Hidden = parameters.Visibility == 0
            };

            request.Query.Url         = _tweetQueryGenerator.GetChangeTweetReplyVisibilityQuery(parameters);
            request.Query.HttpMethod  = HttpMethod.PUT;
            request.Query.HttpContent = _jsonContentFactory.Create(content);
            return(_twitterAccessor.ExecuteRequestAsync <TweetHideV2Response>(request));
        }
 public Task <ITwitterResult <TweetHideV2Response> > ChangeTweetReplyVisibilityAsync(IChangeTweetReplyVisibilityV2Parameters parameters, ITwitterRequest request)
 {
     return(_queryExecutor.ChangeTweetReplyVisibilityAsync(parameters, request));
 }
 public Task <ITwitterResult <TweetHideV2Response> > ChangeTweetReplyVisibilityAsync(IChangeTweetReplyVisibilityV2Parameters parameters)
 {
     return(ExecuteRequestAsync(request => _tweetsV2Controller.ChangeTweetReplyVisibilityAsync(parameters, request)));
 }
        public async Task <TweetHideV2Response> ChangeTweetReplyVisibilityAsync(IChangeTweetReplyVisibilityV2Parameters parameters)
        {
            var twitterResponse = await _tweetsV2Requester.ChangeTweetReplyVisibilityAsync(parameters).ConfigureAwait(false);

            return(twitterResponse?.Model);
        }