HTTP API Definition: Difference between revisions

From AniDB
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Early Draft =
= Early Draft =


== Anime Data ==
== General Parameters ==
 
Allows retrieval of non-file or episode related information for a specific anime by AID (AniDB anime id).


=== Access ===
These parameters apply to all HTTP XML API pages and should always be added to the request URLs.


Base URL: TBA


Parameters:
Parameters:
Line 16: Line 13:
** client version number, needs to be valid client version number for the given client identification string.
** client version number, needs to be valid client version number for the given client identification string.


Example:
URL: http://.../animedb.pl?show=xmlapi&client=clientname&clienver=13&...
== Anime Search ==
Allows lookup of AniDB anime ids (AIDs) by anime title. Additionally AniDB also provides a daily dump with all anime titles which can be used to implement client-side searches, see: [[API]].
=== Access ===
Base URL: TBA
Parameters:
* query={string}
** the query string to search for.
Example:
URL: http://.../animedb.pl?show=xmlapi&...&t=search&query=sometitle
=== Data ===
<code><pre>
<?xml version="1.0" encoding="utf-8" ?>
</pre></code>
== Anime Data ==
Allows retrieval of non-file or episode related information for a specific anime by AID (AniDB anime id).
=== Access ===
Base URL: TBA
Parameters:
* aid={integer} [required]
* aid={integer} [required]
** AniDB anime id of the anime you want to retrieve data for.
** AniDB anime id of the anime you want to retrieve data for.
Line 21: Line 55:


Example:
Example:
URL: http://.../animedb.pl?show=xmlapi&client=clientname&clienver=13&aid=1832
URL: http://.../animedb.pl?show=xmlapi&...&t=anime&aid=1832





Revision as of 18:35, 13 April 2008

Early Draft

General Parameters

These parameters apply to all HTTP XML API pages and should always be added to the request URLs.


Parameters:

  • client={string} [required]
    • client identification string, needs to be a registered client identifier, see:
  • clientver={integer} [required]
    • client version number, needs to be valid client version number for the given client identification string.


Example: URL: http://.../animedb.pl?show=xmlapi&client=clientname&clienver=13&...


Anime Search

Allows lookup of AniDB anime ids (AIDs) by anime title. Additionally AniDB also provides a daily dump with all anime titles which can be used to implement client-side searches, see: API.

Access

Base URL: TBA

Parameters:

  • query={string}
    • the query string to search for.

Example: URL: http://.../animedb.pl?show=xmlapi&...&t=search&query=sometitle


Data

<?xml version="1.0" encoding="utf-8" ?>


Anime Data

Allows retrieval of non-file or episode related information for a specific anime by AID (AniDB anime id).

Access

Base URL: TBA

Parameters:

  • aid={integer} [required]
    • AniDB anime id of the anime you want to retrieve data for.


Example: URL: http://.../animedb.pl?show=xmlapi&...&t=anime&aid=1832


Data

<?xml version="1.0" encoding="utf-8" ?>
<anime id="1">
   <url>http://anidb.net/a1</url>
   <titles>
      <!-- should we include all titles or are official+main title enough? -->
      <title type="main" lang="x-jat">Seikai no Monshou</title>
      <title type="official" lang="ja">星界の紋章</title>
      <title type="official" lang="en">Crest of the Stars</title>
      <title type="official" lang="fr">Crest of the Stars</title>
      <title type="official" lang="pl">Crest of the Stars</title>
   </titles>
   <type>TV Series</type>
   <episodecount>13</episodecount>
   <date>
      <!-- note: dates can also be YYYY-MM-?? and YYYY-??-?? -->
      <from>1999-01-03</from>
      <till>1999-03-28</from>
   </date>
   <categories>
      <category id="233" weight="6">Dynamic::Plot Continuity</category>
      <category id="4" weight="4">Elements::Action</category>
      ...
   <categories>
   <producers>
      <producer id="34" type="Financial Production">Bandai Visual</producer>
      <producer id="108" type="Music Production">BeSTACK</producer>
      ...
   </producers>
   <relations>
      <!-- relations are always listed with official transcription title -->
      <relation type="sequel" aid="4">Seikai no Senki</type>
      <relation type="prequel" aid="6">Seikai no Danshou</type>
      <relation type="summary" aid="1623">Seikai no Monshou Movie</type>
   </relations>
   <ratings>
      <rating type="permanent" count="2333">8.54</rating>
      <rating type="temporary" count="82">7.61</rating>
      <rating type="review" count="9">9.01</rating>
   </ratings>
   <images>
      <image size="full">http://img5.anidb.net/pics/anime/440.jpg</image>
      <image size="small">http://img5.anidb.net/pics/anime/thumbs/150/440.jpg-thumb.jpg</image>
      <image size="tiny">http://img5.anidb.net/pics/anime/thumbs/50/440.jpg-thumb.jpg</image>
   </images>
   <description>
Jinto Lin's life changes forever when the Humankind Empire Abh takes over his home planet of Martine without firing a single shot. He is soon sent off to study the Abh language and culture and to prepare himself for his future as a nobleman - a future he never dreamed of. Or wanted.

Now, Jinto is entering the next phase of his training, and he is about to meet his first Abh, the lovely Lafiel. But Jinto is about to learn that she is more than she appears to be. And together they will have to fight for their very lives.
   </description>
</anime>