I need to make an ajax pagination of a Behance Design portfolio using the Behance API.
I found out that in order to display all the projects from a design Behance portfolio using the API key, I need to paginate changing the query get at the end of the JSON url.
https://api.behance.net/v2/users/rolfo85/projects?client_id=APIKEY&per_page=25&page=2
So the point is: how can I know when I get the end, when I don't have to paginate anymore ?
Apparently the number of pages is not available and the total number of project neither, I can only go for "page=1, page=2, page=3" etc... but no idea which one is gonna be the last one. And of course, if I try to make a call of an inexistent page, I get an error.
Some idea?