Пример #1
0
        public string GetDeleteRulesFromFilteredStreamQuery(IDeleteRulesFromFilteredStreamV2Parameters parameters)
        {
            var query = new StringBuilder("https://api.twitter.com/2/tweets/search/stream/rules");

            query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters);
            return(query.ToString());
        }
Пример #2
0
        public async Task <FilteredStreamRulesV2Response> DeleteRulesFromFilteredStreamAsync(IDeleteRulesFromFilteredStreamV2Parameters parameters)
        {
            var twitterResult = await _streamsV2Requester.DeleteRulesFromFilteredStreamAsync(parameters).ConfigureAwait(false);

            return(twitterResult?.Model);
        }
Пример #3
0
 public Task <ITwitterResult <FilteredStreamRulesV2Response> > DeleteRulesFromFilteredStreamAsync(IDeleteRulesFromFilteredStreamV2Parameters parameters, ITwitterRequest request)
 {
     return(_streamsV2QueryExecutor.DeleteRulesFromFilteredStreamAsync(parameters, request));
 }
Пример #4
0
        public Task <ITwitterResult <FilteredStreamRulesV2Response> > DeleteRulesFromFilteredStreamAsync(IDeleteRulesFromFilteredStreamV2Parameters parameters, ITwitterRequest request)
        {
            var content = new FilteredStreamOperations {
                delete = new FilteredStreamDeleteOperation(parameters.RuleIds)
            };

            request.Query.Url         = _streamsV2QueryGenerator.GetDeleteRulesFromFilteredStreamQuery(parameters);
            request.Query.HttpMethod  = HttpMethod.POST;
            request.Query.HttpContent = _jsonContentFactory.Create(content);
            return(_twitterAccessor.ExecuteRequestAsync <FilteredStreamRulesV2Response>(request));
        }
Пример #5
0
 public Task <ITwitterResult <FilteredStreamRulesV2Response> > DeleteRulesFromFilteredStreamAsync(IDeleteRulesFromFilteredStreamV2Parameters parameters)
 {
     return(ExecuteRequestAsync(request => _streamsV2Controller.DeleteRulesFromFilteredStreamAsync(parameters, request)));
 }