celiao / tmdbsimple

A wrapper for The Movie Database API v3.
GNU General Public License v3.0
582 stars 121 forks source link

How to iterate over pages using tmdb.Movies("*") #73

Closed GiovanniColonni closed 3 years ago

GiovanniColonni commented 3 years ago

hi all, my goal is get the lists of all the movies and in order to do that i use this code :

mov = tmdb.Movies("*") mov.top_rated()

the last istruction is able to rank the movies by rate and say me also another thing :

image now the question is : how can i iterate over pages ? and also, is there a better way to archive my goal ? 😄

version of tmdbsimple 2.6.6

GiovanniColonni commented 3 years ago

to solve this issue you can skip the wrapper and using the direct api :

https://api.themoviedb.org/3/movie/top_rated?api_key=<<api_key>>&language=en-US&page=x"

and iterate over the parameter page.