Esempio n. 1
0
        public ITwitterPageIterator <ITwitterResult <ITweetDTO[]>, long?> GetUserTimelineIterator(IGetUserTimelineParameters parameters)
        {
            _validator.Validate(parameters);

            var request = TwitterClient.CreateRequest();

            return(_timelineController.GetUserTimelineIterator(parameters, request));
        }
        public void Validate(IGetHomeTimelineParameters parameters)
        {
            _timelineClientRequiredParametersValidator.Validate(parameters);

            var maxPageSize = Limits.TIMELINE_HOME_PAGE_MAX_PAGE_SIZE;

            if (parameters.PageSize > maxPageSize)
            {
                throw new TwitterArgumentLimitException($"{nameof(parameters.PageSize)}", maxPageSize, nameof(Limits.TIMELINE_HOME_PAGE_MAX_PAGE_SIZE), "page size");
            }
        }