HTTP API Definition: Difference between revisions

Jump to navigation Jump to search
Line 310: Line 310:


</hotanime>
</hotanime>
</pre></code>
=== Main ===
A one-stop command returning the combined results of random recommendation, random similar, and hot anime.  Use this command instead of scraping the HTML, and if you need more than one of the individual replies.
==== Access ====
Base URL: <u><nowiki>http://api.anidb.net:9001/httpapi?request=main</nowiki></u>
Parameters:
* <tt>request=main</tt>
Example:
URL: <u><nowiki>http://api.anidb.net:9001/httpapi?client={str}&clientver={int}&protover=1&request=main</nowiki></u>
<code><pre>
<main>
    <hotanime>
        <anime id="8556" restricted="false">
            <episodecount>12</episodecount>
            <startdate>2012-01-10</startdate>
            <title xml:lang="x-jat" type="main">Another</title>
            <ratings>
                <permanent count="248">6.61</permanent>
                <temporary count="261">7.88</temporary>
                <review count="1">4.33</review>
            </ratings>
            <picture>79963.jpg</picture>
        </anime>
        ...
    </hotanime>
    <randomsimilar>
        <similar>
            <source aid="8107" restricted="false">
                <title xml:lang="x-jat" type="main">A Channel: The Animation</title>
                <picture>59870.jpg</picture>
            </source>
            <target aid="4777" restricted="false">
                <title xml:lang="x-jat" type="main">Lucky Star</title>
                <picture>65555.jpg</picture>
            </target>
        </similar>
        ...
    <randomsimilar>
    <randomrecommendation>
        <recommendation>
            <anime id="44" restricted="false">
                <type>OVA</type>
                <episodecount>1</episodecount>
                <startdate>2000-05-24</startdate>
                <enddate>2000-05-24</enddate>
                <title xml:lang="x-jat" type="main">Amon Devilman Mokushiroku</title>
                <picture>14016.jpg</picture>
                <ratings>
                    <permanent count="317">387</permanent>
                    <recommendations>1</recommendations>
              </ratings>
          </anime>
      </recommendation>
      ....
    </randomrecommendation>
</main>
</pre></code>
</pre></code>


Navigation menu

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