HTTP API Definition: Difference between revisions

m
no edit summary
m (<tt> ... </tt> reads more nicely for parameters)
mNo edit summary
Line 1: Line 1:
{{TOCright}}
{{TOCright}}
 
== Early Draft ==
= Early Draft =
 
{{eyecatch|Note|This is still a very early draft and has not yet been implemented!}}
{{eyecatch|Note|This is still a very early draft and has not yet been implemented!}}


= General =
== General ==
 
The HTTP XML API is only a small part of the AniDB API framework, please refer to [[API]] for an overview.
The HTTP XML API is only a small part of the AniDB API framework, please refer to [[API]] for an overview.


== Encoding ==
=== Encoding ===
 
All content is UTF8 encoded and gzip compressed (you may have to handle the decompressing yourself, if your HTTP library doesn't support compression of HTTP data).
All content is UTF8 encoded and gzip compressed (you may have to handle the decompressing yourself, if your HTTP library doesn't support compression of HTTP data).


== Flooding ==
=== Flooding ===
 
All users of this API should employ heavy local caching. Requesting the same dataset multiple times on a single day can get you banned. The same goes for request flooding. You should not request more than one page every two seconds on average.
All users of this API should employ heavy local caching. Requesting the same dataset multiple times on a single day can get you banned. The same goes for request flooding. You should not request more than one page every two seconds on average.


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


All users of the HTTP XML API need to be registered and have to provide their registered client identifier and version number on each request. For more information on client registration visit [[UDP API Definition]].
All users of the HTTP XML API need to be registered and have to provide their registered client identifier and version number on each request. For more information on client registration visit [[UDP API Definition]].


Parameters:
Parameters:
Line 30: Line 23:
* <tt>clientver={integer}</tt> [required]
* <tt>clientver={integer}</tt> [required]
** 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:
Example:
URL: http://.../animedb.pl?show=xmlapi&client=clientname&clienver=13&...
URL: http://.../animedb.pl?show=xmlapi&client=clientname&clienver=13&...


= Anime Search =
== 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]].
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 ==
=== Access ===
 
Base URL: TBA
Base URL: TBA


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


== Data ==
=== Data ===
 
<code><pre>
<code><pre>
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
Line 74: Line 63:
</pre></code>
</pre></code>


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


== Access ==
=== Access ===
 
Base URL: TBA
Base URL: TBA


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


 
=== Data ===
== Data ==
 
<code><pre>
<code><pre>
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
staff
2,096

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.