SocialOpinion-Public icon indicating copy to clipboard operation
SocialOpinion-Public copied to clipboard

SearchTweets methods are ignoring maxResults parameter.

Open OrkanCom opened this issue 3 years ago • 1 comments

Describe the bug SearchTweets ( in RecentSearch service ) methods ignores maxResults parameter.

To Reproduce List<RecentSearchResultsModel> result = _searchService.SearchTweets(query, 10, 5); return result;

Expected behavior Should return 10 tweets by default. Or if given maxResults parameter is let's say 20, api should return 20 etc. According to docs, default is 10, not 100; "The max_results request parameter enables you to configure the number of Tweets returned per response. This defaults to 10 Tweets and has a maximum of 100. " -> https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/paginate

Screenshots Screenshot from 2021-08-31 06-17-01

Additional context https://github.com/jamiemaguiredotnet/SocialOpinion-Public/blob/5f8e0a28abfa6f52631c0c567c2b09f422154fd4/SocialOpinionAPI/Services/RecentSearch/RecentSearchService.cs#L24

https://github.com/jamiemaguiredotnet/SocialOpinion-Public/blob/5f8e0a28abfa6f52631c0c567c2b09f422154fd4/SocialOpinionAPI/Services/RecentSearch/RecentSearchService.cs#L103

https://github.com/jamiemaguiredotnet/SocialOpinion-Public/blob/5f8e0a28abfa6f52631c0c567c2b09f422154fd4/SocialOpinionAPI/Services/RecentSearch/RecentSearchService.cs#L153

OrkanCom avatar Aug 31 '21 03:08 OrkanCom

Thanks for the feedback. I will resolve this.

jamiemaguiredotnet avatar Oct 03 '21 10:10 jamiemaguiredotnet