Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fetch the rest of the JSON string from a pagination API?

Tags:

json

android

I need to fetch some data from an API and display the data in a ListView. I succeeded getting the JSON string from the API, but that's only part of the data, there is more. How can I fetch the rest of the JSON? Should it be handled at the client side? Should I use a different URL to fetch more data? Thank you in advance.


1 Answers

Yes it will be handled in client-side. Just change the page number in API url to get the next set of JSON data.

See the page attribute in url :

https://api.github.com/resource?page=2>;
like image 123
vjdhama Avatar answered Dec 08 '25 08:12

vjdhama



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!