Example #1
0
 public void Validate(IGetAccountListSubscriptionsParameters parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException(nameof(parameters));
     }
 }
Example #2
0
 public GetAccountListSubscriptionsParameters(IGetAccountListSubscriptionsParameters parameters) : base(parameters)
 {
     if (parameters == null)
     {
         PageSize = TwitterLimits.DEFAULTS.LISTS_GET_USER_SUBSCRIPTIONS_MAX_PAGE_SIZE;
     }
 }
Example #3
0
        public ITwitterIterator <ITwitterList> GetAccountListSubscriptionsIterator(IGetAccountListSubscriptionsParameters parameters)
        {
            var iterator = _twitterListsRequester.GetAccountListSubscriptionsIterator(parameters);

            return(new TwitterIteratorProxy <ITwitterResult <ITwitterListCursorQueryResultDTO>, ITwitterList>(iterator, pageResult =>
            {
                var listDtos = pageResult.Model.TwitterLists;
                return listDtos?.Select(dto => _client.Factories.CreateTwitterList(dto)).ToArray();
            }));
        }
        public void Validate(IGetAccountListSubscriptionsParameters parameters)
        {
            _twitterListsClientRequiredParametersValidator.Validate(parameters);

            var maxPageSize = Limits.LISTS_GET_USER_SUBSCRIPTIONS_MAX_PAGE_SIZE;

            if (parameters.PageSize > maxPageSize)
            {
                throw new TwitterArgumentLimitException($"{nameof(parameters.PageSize)}", maxPageSize, nameof(Limits.LISTS_GET_USER_SUBSCRIPTIONS_MAX_PAGE_SIZE), "page size");
            }
        }
Example #5
0
 public ITwitterIterator <ITwitterList> GetAccountListSubscriptionsIterator(IGetAccountListSubscriptionsParameters parameters)
 {
     return(GetUserListSubscriptionsIterator(new GetUserListSubscriptionsParameters(parameters)));
 }
Example #6
0
 public GetUserListSubscriptionsParameters(IGetAccountListSubscriptionsParameters parameters) : base(parameters)
 {
 }
Example #7
0
        public async Task <ITwitterList[]> GetAccountListSubscriptionsAsync(IGetAccountListSubscriptionsParameters parameters)
        {
            var iterator = GetAccountListSubscriptionsIterator(parameters);

            return((await iterator.NextPageAsync().ConfigureAwait(false)).ToArray());
        }
        public ITwitterPageIterator <ITwitterResult <ITwitterListCursorQueryResultDTO> > GetAccountListSubscriptionsIterator(IGetAccountListSubscriptionsParameters parameters)
        {
            _validator.Validate(parameters);

            var request = TwitterClient.CreateRequest();

            request.ExecutionContext.Converters = JsonQueryConverterRepository.Converters;
            return(_twitterListController.GetUserListSubscriptionsIterator(new GetUserListSubscriptionsParameters(parameters), request));
        }
Example #9
0
 public void Validate(IGetAccountListSubscriptionsParameters parameters)
 {
     _twitterListsClientParametersValidator.Validate(parameters);
 }