Open simeyla opened 6 years ago
This was the best I came up with. Wish it was 'built in' in some fashion.
if (campaignInsights.paging != null && campaignInsights.paging.next != null)
{
var url = new Uri(campaignInsights.paging.next.ToString()).PathAndQuery;
var urlWithoutAPIVersion = url.Substring(url.IndexOf("/", 1)); // skip API version in URL
campaignInsights = JObject.Parse(Api.Client.Get(urlWithoutAPIVersion).ToString());
}
This is where campaignInsights
is the response from GetInsights()
where paging was returned.
As far as I know there currently isn't support for this in the SDK yet, I'll have to see how the official API does it and see if I can implement it in the next release :)
How am I supposed to do paging when the response returns back
paging
element?I can take the URL and run it but how to do that within your API?