HTTP API Definition: Difference between revisions

no edit summary
No edit summary
Line 66: Line 66:


===== Data =====
===== Data =====
<code><pre>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<anime id="1" restricted="false">
<anime id="1" restricted="false">
Line 172: Line 172:
   </episodes>
   </episodes>
</anime>
</anime>
</pre></code>
</pre>


==== Errors ====
==== Errors ====
[http://anidb.net/perl-bin/animedb.pl?show=cmt&post=159118 According to ommina] the API does not use HTTP return code. Instead you will get XML consisting of one tag with a textual description.
[http://anidb.net/perl-bin/animedb.pl?show=cmt&post=159118 According to ommina] the API does not use HTTP return code. Instead you will get XML consisting of one tag with a textual description.
<code><pre>
<pre>
<error>Banned</error>
<error>Banned</error>
</pre></code>
</pre>


=== Random Recommendation ===
=== Random Recommendation ===
Line 193: Line 193:
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=randomrecommendation</nowiki></u>
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=randomrecommendation</nowiki></u>


<code><pre>
<pre>
<randomrecommendation>
<randomrecommendation>
     <recommendation>
     <recommendation>
Line 213: Line 213:


<randomrecommendation>
<randomrecommendation>
</pre></code>
</pre>


=== Random Similar ===
=== Random Similar ===
Line 228: Line 228:
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=randomsimilar</nowiki></u>
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=randomsimilar</nowiki></u>


<code><pre>
<pre>
<randomsimilar>
<randomsimilar>
     <similar>
     <similar>
Line 244: Line 244:


</randomsimilar>
</randomsimilar>
</pre></code>
</pre>


=== Hot Anime ===
=== Hot Anime ===
Line 259: Line 259:
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=hotanime</nowiki></u>
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=hotanime</nowiki></u>


<code><pre>
<pre>
<hotanime>
<hotanime>
     <anime id="8556" restricted="false">
     <anime id="8556" restricted="false">
Line 276: Line 276:


</hotanime>
</hotanime>
</pre></code>
</pre>


=== Main ===
=== Main ===
Line 362: Line 362:
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=mylistsummary&user={str}&pass={str}</nowiki></u>
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=mylistsummary&user={str}&pass={str}</nowiki></u>


<code><pre>
<pre>
<mylistsummary uid="40237">
<mylistsummary uid="40237">
     <mylistitem aid="5841" state="2">
     <mylistitem aid="5841" state="2">
Line 371: Line 371:
     </mylistitem>
     </mylistitem>
<mylistsummary>
<mylistsummary>
</pre></code>
</pre>


=== User Hints ===
=== User Hints ===
Line 392: Line 392:
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=hints&user={str}&pass={str}&type=1</nowiki></u>
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=hints&user={str}&pass={str}&type=1</nowiki></u>


<code><pre>
<pre>
<hints uid="40237" type="1">
<hints uid="40237" type="1">
     <hint adddate="2015-03-23">
     <hint adddate="2015-03-23">
Line 399: Line 399:
     </hint>
     </hint>
</hints>
</hints>
</pre></code>
</pre>


[[Category:Development]]
[[Category:Development]]
[[Category:API]]
[[Category:API]]
MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.