ZendeskApi_v2 icon indicating copy to clipboard operation
ZendeskApi_v2 copied to clipboard

perPage on GetByPageUrlAsync overrides Url parameter and breaks result

Open skartknet opened this issue 2 years ago • 0 comments

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=30

Then 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.

skartknet avatar Sep 26 '22 06:09 skartknet