Exemplo n.º 1
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));
        }
Exemplo n.º 2
0
        public RequestWithPayload GetPublishMessageQuery(IPublishMessageParameters parameters)
        {
            var query = new StringBuilder(Resources.Message_Create);

            query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters);

            var content = _jsonContentFactory.Create(GetPublishMessageBody(parameters));

            return(new RequestWithPayload
            {
                Url = query.ToString(),
                Content = content
            });
        }