I am still not able to get anything fruitful from the API wiki. May be i am a naive developer .
Anyways, i could not find the database for Series. Do i need to create a replcia of db on my local machine and then use api calls ?
No, all the calls are documented under "File Structure" & "Example Usage" on http://www.thetvdb.com/wiki/index.php/Programmers_API
. If you do want a snapshot of the entire database you are able to get one from a topic on the forums somewhere but these are rarely needed by developers and you still need to use the api to keep upto date.
What i need to do is:
1. Provide a user interface for entering a show.
2. For that selected show i form a URL using the code
var showURL= mirror + "api/GetSeries.php?seriesname=" + show + "&language=" + lang;
3. Now i am generating an XML file here which i can see on browser but when i try to get this xml file into a string, my code fails.
also i am doubtful this might be happening because there is no place where i was required to use my API Key,
Please suggest ...
As documented on the wiki page, not all the calls require api keys, for example step 3 doesn't but step 4 does:
Step 3: Loop through and look up each series id
a. Retrieve http://www.thetvdb.com/api/GetSeries.php?seriesname=
<series name from your database>
b. Optionally present results to user so they can select the match they want.
c. Store this series id in a table in your database.
Step 4: Get base information for each series
a. Retrieve <mirrorpath_zip>/api/<apikey>/series/<seriesid>/all/<language>.zip and extract <language>.xml and banners.xml.
b. Process the XML data in <language>.xml and store all <Series> data.
c. Download each series banner in banners.xml and prompt the user to see which they want to keep.
Note: Make sure you record <id> from each series, since it's returned in updates as <Series>.
Please watch this video to help LSU Computer Society
try to win the RBS ESSA
society competition! http://youtu.be/8JrhmoSXLXw
- only 1:36min