Al igual que en este tema, estoy buscando la forma correcta de realizar la paginación en el endpoint /latest.json (Temas), específicamente saber cuál es la última página.
He descubierto que, cuando hay más resultados que obtener, la respuesta contiene un "more_topics_url": "/latest?page=X" para la siguiente página. Sin embargo, según mis pruebas, parece que incluso cuando no hay más resultados, recibimos otra página en este campo.
¿Existe una forma adecuada de saber cuándo hemos llegado a la última página?
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.