public string GetCountAccountActivitySubscriptionsQuery(ICountAccountActivitySubscriptionsParameters parameters)
        {
            var query = new StringBuilder("https://api.twitter.com/1.1/account_activity/all/subscriptions/count.json");

            query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters);
            return(query.ToString());
        }
Beispiel #2
0
 public void Validate(ICountAccountActivitySubscriptionsParameters parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException(nameof(parameters));
     }
 }
Beispiel #3
0
 public void Validate(ICountAccountActivitySubscriptionsParameters parameters)
 {
     _accountActivityClientParametersValidator.Validate(parameters);
 }
        public async Task <IWebhookSubscriptionsCount> CountAccountActivitySubscriptions(ICountAccountActivitySubscriptionsParameters parameters)
        {
            var twitterResult = await _accountActivityRequester.CountAccountActivitySubscriptions(parameters).ConfigureAwait(false);

            return(twitterResult?.DataTransferObject);
        }
Beispiel #5
0
        public Task <ITwitterResult <IWebhookSubscriptionsCount> > CountAccountActivitySubscriptions(ICountAccountActivitySubscriptionsParameters parameters, ITwitterRequest request)
        {
            var consumerCredentials = new ConsumerCredentials(request.Query.TwitterCredentials);

            request.Query.Url                = _accountActivityQueryGenerator.GetCountAccountActivitySubscriptionsQuery(parameters);
            request.Query.HttpMethod         = HttpMethod.GET;
            request.Query.TwitterCredentials = new TwitterCredentials(consumerCredentials);

            return(_twitterAccessor.ExecuteRequest <IWebhookSubscriptionsCount>(request));
        }
 public Task <ITwitterResult <IWebhookSubscriptionsCount> > CountAccountActivitySubscriptions(ICountAccountActivitySubscriptionsParameters parameters)
 {
     _validator.Validate(parameters);
     return(ExecuteRequest(request => _accountActivityController.CountAccountActivitySubscriptions(parameters, request)));
 }
Beispiel #7
0
        public async Task <IWebhookSubscriptionsCount> CountAccountActivitySubscriptionsAsync(ICountAccountActivitySubscriptionsParameters parameters)
        {
            var twitterResult = await _accountActivityRequester.CountAccountActivitySubscriptionsAsync(parameters).ConfigureAwait(false);

            return(twitterResult?.Model);
        }