rubengarciam / wayne

Comic Book Manager & Reader
https://pinwi.co/wayne
7 stars 0 forks source link

Anime News Network metadata API #53

Closed rubengarciam closed 4 years ago

rubengarciam commented 4 years ago

Describe the solution you'd like

Add Anime News Network as a metadata source

rubengarciam commented 4 years ago

It seems ANN is a good source for retrieving a manga or volume metadata but there is no way to retrieve a specific chapter/release/issue information.

Example, retrieving Vagabond:

GET https://cdn.animenewsnetwork.com/encyclopedia/api.xml?manga=~vagabond

Returns:

<ann>
  <manga id="1595" gid="2862166592" type="manga" name="Vagabond" precision="manga" generated-on="2020-08-05T23:58:42Z">
    <related-prev rel="serialized in" id="2017"/>
    <info gid="3456699653" type="Picture" src="https://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A1595-3.jpg" width="196" height="200">
      <img src="https://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A1595-3.jpg" width="196" height="200"/>
      <img src="https://cdn.animenewsnetwork.com/thumbnails/max500x600/encyc/A1595-3.jpg" width="245" height="250"/>
    </info>
    <info gid="718929565" type="Main title" lang="EN">Vagabond</info>
    <info gid="1215548149" type="Alternative title" lang="JA">バガボンド</info>
    <info gid="3209063110" type="Alternative title" lang="ZH-TW">浪人劍客</info>
    <info gid="2096600481" type="Genres">adventure</info>
    <info gid="844697651" type="Genres">drama</info>
    <info gid="1128162071" type="Genres">psychological</info>
    <info gid="880480885" type="Genres">romance</info>
    <info gid="1737043846" type="Themes">historical</info>
    <info gid="3136603099" type="Themes">martial arts</info>
    <info gid="2103438084" type="Themes">samurai</info>
    <info gid="567575386" type="Themes">swordplay</info>
    <info gid="2593383141" type="Objectionable content">MA</info>
    <info gid="1883417662" type="Plot Summary">Growing up in 17th century Sengoku era Japan, Shinmen Takezou is shunned by the local villagers as a devil child due to his wild and violent nature. Running away from home with a fellow boy at age 17, Takezou joins the Toyotomi army to fight the Tokugawa clan at the battle of Sekigahara. However, the Tokugawa win a crushing victory, leading to nearly three hundred years of Shogunate rule. Takezou and his friend manage to survive the battle, and afterwards swear to do great things with their lives. But after their paths seperate, Takezou becomes a wanted criminal, and must change his name and his nature in order to escape an ignoble death. Based on the book "Musashi" by Eiji Yoshikawa, Vagabond is a fictional retelling of the life of Miyamoto Mushashi, often referred to as the "Sword Saint" - perhaps the most famous and successful of Japan's sword fighters.</info>
    <info type="Vintage">1999-03-23</info>
    <info gid="3894019950" type="Official website" lang="EN" href="http://www.madman.com.au/actions/periodicals.do?method=view&amp;periodicalId=36">Madman's Official Vagabond (Manga) Website</info>
    <ratings nb_votes="345" weighted_score="8.877" bayesian_score="8.86404"/>
    <release date="2008-09-16" href="https://www.animenewsnetwork.com/encyclopedia/releases.php?id=11040">Vagabond - Art Book: Sumi (Artbook)</release>
    <release date="2008-09-16" href="https://www.animenewsnetwork.com/encyclopedia/releases.php?id=11041">Vagabond - Art Book: Water (Artbook)</release>
    <release date="2002-04-05" href="https://www.animenewsnetwork.com/encyclopedia/releases.php?id=18394">Vagabond (GN 1)</release>
    <release date="2002-07-01" href="https://www.animenewsnetwork.com/encyclopedia/releases.php?id=12552">Vagabond (GN 2)</release>
    <release date="2002-10-06" href="https://www.animenewsnetwork.com/encyclopedia/releases.php?id=18395">Vagabond (GN 3)</release>
    <release date="2003-12-01" href="https://www.animenewsnetwork.com/encyclopedia/releases.php?id=18396">Vagabond (GN 4)</release>
...

but the release id doesn't correspond with its equivalent when searching for _manga=releaseid:

GET https://cdn.animenewsnetwork.com/encyclopedia/api.xml?manga=18395

returns

<ann>
  <manga id="18395" gid="2709371576" type="manga" name="Tsunagu to Seiza ni Naru Y&#x14D; ni" precision="manga" generated-on="2020-08-06T00:05:39Z">
    <related-prev rel="serialized in" id="4660"/>
    <info gid="3743234546" type="Picture" src="https://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A18395-3743234546.1462475745.jpg" width="200" height="200">
      <img src="https://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A18395-3743234546.1462475745.jpg" width="200" height="200"/>
      <img src="https://cdn.animenewsnetwork.com/thumbnails/max500x600/encyc/A18395-3743234546.1462475745.jpg" width="460" height="460"/>
    </info>
    <info gid="2026546510" type="Main title" lang="JA">Tsunagu to Seiza ni Naru Yō ni</info>
    <info gid="2294632604" type="Alternative title" lang="JA">つなぐと星座になるように</info>
    <info gid="1510182545" type="Alternative title" lang="ZH-TW">串連的星座</info>
    <info gid="3056603808" type="Genres">drama</info>
    <info gid="2414008586" type="Genres">romance</info>
    <info gid="2766023033" type="Number of tankoubon">6</info>
    <info gid="3541488846" type="Number of pages">179</info>
    <info gid="4045665492" type="Vintage">2010-07-09 to 2013-02-25 (serialized in &lt;i&gt;Kiss&lt;/i&gt;)</info>
    <info gid="1100306023" type="Vintage">2013-04-08 to 2014-02-09 (serialized in &lt;i&gt;Kiss Plus&lt;/i&gt;)</info>
    <news datetime="2011-12-08T14:25:00Z" href="https://www.animenewsnetwork.com/news/2011-12-08/top-manga-ranked-by-kono-manga-ga-sugoi-2012-voters">Top Manga Ranked by &lt;cite&gt;Kono Manga ga Sugoi 2012&lt;/cite&gt; Voters</news>
    <staff gid="2346248353">
      <task>Story &amp; Art</task>
      <person id="147568">Sumako Kari</person>
    </staff>
  </manga>
</ann>