Open josh-cook opened 5 years ago
Would using the wiki API be the best way of going about doing this? They seem to provide some image data:
{
"batchcomplete": "",
"warnings": {
"extracts": {
"*": "\"exlimit\" was too large for a whole article extracts request, lowered to 1.\nHTML may be malformed and/or unbalanced and may omit inline images. Use at your own risk. Known problems are listed at https://www.mediawiki.org/wiki/Extension:TextExtracts#Caveats."
}
},
"query": {
"pages": {
"2972": {
"pageid": 2972,
"ns": 0,
"title": "The Sad Onion",
"contentmodel": "wikitext",
"pagelanguage": "en",
"pagelanguagehtmlcode": "en",
"pagelanguagedir": "ltr",
"touched": "2019-10-26T09:10:46Z",
"lastrevid": 188636,
"length": 802,
"thumbnail": {
"source": "https://gamepedia.cursecdn.com/bindingofisaacre_gamepedia/1/1a/The_Sad_Onion_Icon.png?version=abb57c5cd0421f7cfb3cd6df9b54502f",
"width": 32,
"height": 32
},
"pageimage": "The_Sad_Onion_Icon.png",
"extract": "<p><b>The Sad Onion</b> is a passive item.\n</p>\n\n\n<h2><span id=\"Effect\">Effect</span></h2>\n<ul><li>+0.7 Tears up.</li></ul><h2><span id=\"In-game_Footage\">In-game Footage</span></h2>\n\n<h2><span id=\"Trivia\">Trivia</span></h2>\n<ul><li>The Sad Onion was the first item designed by Edmund for the original game <i>The Binding of Isaac</i>, which is probably why it has the item ID 1.</li>\n<li>The item's effect is a reference to the fact that when onions are cut, they have a tendency to make people involuntarily cry.</li></ul><h2><span id=\"Seeds\">Seeds</span></h2>\n<p><span> PC </span> TZF1 B0TK (Treasure room adjacent to spawn)\n</p><p><span> Vita </span> XLT2 MWVN (Treasure room adjacent to spawn)\n</p><p><span> 3DS </span> S6EY 7YZT (First floor treasure room (<i>south</i>); Curse of the Labyrinth)\n</p><p><br></p>\n<p><br></p>"
}
}
}
}
The thumbnail provided seems like it could be the right size to use: https://gamepedia.cursecdn.com/bindingofisaacre_gamepedia/1/1a/The_Sad_Onion_Icon.png?version=abb57c5cd0421f7cfb3cd6df9b54502f
As a user of the game I believe adding the image assets to each item using their correlating ID so visually it looks better and easier to read for the user. -> with potential to linking them to the BoI wiki or plantinum god.