Closed skartknet closed 1 year ago
@skartknet Can you supply a test case to replicate this issue?
@skartknet Looked at the issue more. I think the following test is an example of what you are doing and you will notice the pageSize
is a parameter to the GetByPageUrlAsync
method the pageSize is optional and defaults to 100 as that is the max allowed.
closing "As Designed" but if you want to submit a PR with overload that using the original page size. I would happily accept it.
I'm querying Articles with
GetArticlesAsync
and I'm getting in the results a NextPage like 'https://xxxxx.zendesk.com/api/v2/help_center/en-us/articles.json?page=2&per_page=30Then I use this URL to query the next page using the
GetArticlesByUrlAsync
method just like:var response = await _zendeskService.GetArticlesByUrlAsync(response.NextPage);
This by default sets the
perPage
parameter to 100, when the value on the URL is 30, and the API breaks and doesn't return any items anymore. I reckon the method should check if the parameter already exists on the passed URL and mantain that value.