We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi team, Just have a question, how does pagination work for cases like below:
APIResponse res = new APIRequest<APINode>(context, "", "search", "GET").execute(params);
Please advise. Thanks, Sang
The text was updated successfully, but these errors were encountered:
Hi @sang-d
You can do something like the following. Basically you can cast the api response into a APINodeList, and then do the pagination.
APIRequest<Campaign> campaigns_request = new APIRequest<Campaign>(context, "act_" + account.getId(), "/campaigns", "GET", null, Campaign.getParser()) .requestField("name"); APINodeList<Campaign> campaigns = (APINodeList<Campaign>)(campaigns_request.execute()); for (Campaign campaign : campaigns) { System.out.println("campaign: " + campaign); } campaigns = campaigns.nextPage(); for (Campaign campaign : campaigns) { System.out.println("campaign: " + campaign); }
Sorry, something went wrong.
No branches or pull requests
Hi team,
Just have a question, how does pagination work for cases like below:
Please advise.
Thanks,
Sang
The text was updated successfully, but these errors were encountered: