ZendeskApi_v2
ZendeskApi_v2 copied to clipboard
perPage on GetByPageUrlAsync overrides Url parameter and breaks result
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.