How to get all data of a open api site
I'm going to build a movie website. I found a open movie database : http://www.themoviedb.org/ and I need to get all data into my database.
This site provide an api to get data: h开发者_StackOverflow中文版ttp://api.themoviedb.org/2.1
So how can I get all data of this database and insert into my database? Should I do it?
Thanks! I'm using php&mysql.
Rather than copying their entire database (and having to keep it updated, etc.), what about doing this:
- When a query is made, check if it exists within your database.
- If the entry doesn't exist, query the TMDb API.
- Store the data in your database for future use.
This will help keep your database small, and tuned to your traffic.. and it will ensure that you always have the newest data available from TMDb.
Update: there's even an API call that checks the last updated date of the information. You could store this date in your Database, and use that to verify if your data is still valid.
the best place to ask would be: http://forums.themoviedb.org/forum/8/api-chat/
精彩评论