API:Updates

From TvDBwiki
Jump to: navigation, search

NOTE: If possible, please use the static updates files. They are not restricted to the 1000 most recent series/episodes nor the 30 day limit.


This interface returns all of the series and episode id's that have been updated since <time>. Please note that this only returns the 1000 most recent series and 1000 most recent episodes. To avoid missing updates, please check this interface daily if possible.

Location

<mirrorpath>/api/Updates.php?type=none

<mirrorpath>/api/Updates.php?time=<time>

<mirrorpath>/api/Updates.php?time=<time>&type=<type>

Parameters

<time>

This is the epoch time of your last update. This parameter must be within the previous 30 days, otherwise you'll get an error message. If your last update was over 30 days ago, please do a complete update of your entire data set. To keep current with all updates, you should remember the <Time> returned by this interface and use it for your next query, since your local clock may differ from the server's clock. This field is optional if <type> is none.

<type>

This can either be series, episode, all, or none. If the parameter is left off, it defaults to series. This determines which types of records are returned in the results. Since you can easily get updates from the zipped copy of the Full Series Record, it's often easier to just get that file and update all episodes with that information. If set to none, no records are returned... just the current epoch time.

Example Results

<?xml version="1.0" encoding="UTF-8" ?>
<Items>
  <Time>1201410012</Time>
  <Series>72129</Series>
  <Series>72404</Series>
  <Series>72474</Series>
  <Series>80348</Series>
  <Series>73104</Series>
  <Series>74845</Series>
  <Episode>7653651</Episode>
  <Episode>68746432</Episode>
  <Episode>756473</Episode>
  <Episode>7567484</Episode>
  <Episode>874575</Episode>
  <Episode>7654756</Episode>
</Items>
Personal tools