Similmente a questo argomento, sto cercando il modo corretto di gestire la paginazione sull’endpoint /latest.json (Topics), in particolare per sapere qual è l’ultima pagina.
Ho capito che, quando ci sono altri risultati da recuperare, la risposta contiene un campo "more_topics_url": "/latest?page=X" per la pagina successiva. Tuttavia, dai miei test, sembra che anche quando non ci sono più risultati, otteniamo un’altra pagina in questo campo.
Esiste un modo corretto per sapere quando abbiamo raggiunto l’ultima pagina?
Thanks for such quick response and for checking it out!
You’re right. I was messing on my development environment on the per_page settings trying to avoid creating 30+ topics to test this, and came across this method, but changing it there seems to have the side-effect I mentioned, though returning the amount of results I set there.