1
I have a website about movies made in PHP (codeigniter), I intend to use the site API themoviedb.org to search and show the information to users. And the first time I use an API and would like to ask some questions.
I can already request using Curl, but only one movie at a time using your ID in the URL request. My idea is to display a list of movies already registered on the site, without you doing the search at the time the user wants to see the information.
The first question is whether there is a way to make multiple requests in the API bringing all the records, and the second is how best to save the data in my database, save the entire JSON or separate the data into fields in an EX table:(FILM: film title, release date, etc...).
From what I’ve seen it has a url that returns a list of movies, and goes by
/movie?page=x
... Then you can make a loop to access the pages and capture the data with Dom... It’s an idea... Or you have the libraries ... https://www.themoviedb.org/documentation/api/wrappers-libraries– MagicHat
I’ve tried using libraries, both PHP and Javascript, but they don’t work the way I need. Using a repeat loop I managed to send several requests passing the movie ID as a variable, now comes the question, save the JSON in the database and a good option?
– Rafael Gonçalves
The times I needed something like this, I saved the raw data in the comic... with an acoluna for every kind of data needed... I’m not in a position to tell you anything about json...
– MagicHat
Hi, we’re continuing this chat : https://chat.stackexchange.com/rooms/59922/room-name
– MagicHat
I need 20 reputation to chat with
– Rafael Gonçalves