Page 1 of 1

API Request

Posted: Wed Aug 05, 2020 2:24 pm
by SimplyBLG
I'm building a simple project that downloads cover art for many games, this project is for personal use (and for some of my friends too), but it'll be open sourced too.

Re: API Request

Posted: Wed Aug 05, 2020 4:54 pm
by Leo_Pride
Hello!

You've been granted an API key which you can access through this page.

Please check the Announcements forum on a regular basis to ensure compliance with any changes or updates.

Documentation is available on Swagger here.

Thank you for your interest!
~ Leo

Re: API Request

Posted: Sun Aug 09, 2020 10:56 pm
by SimplyBLG
I'm afraid the public key limit is a bit too restrictive for my use, many API requests are necessary, one for every game that I need to download the image from (ByGameName to find it's id) and another one to find the images urls (which simultaneously requests every ID to not use up the request limit), however even in this case a single user may have hundreds of games, is there a way to request a higher limit, or have the limit refresh more frequently.

Thanks

Re: API Request

Posted: Mon Aug 10, 2020 12:09 am
by Leo_Pride
I think Zer0 can better answer this one.

The established flow is supposed to be:
> Archive Dump > Project Key Update > Public Key Update
...in that order, with the strong possibility that the Keys themselves will be deprecated at a later date in favour of per-IP polling.

Re: API Request

Posted: Mon Aug 10, 2020 12:30 am
by SimplyBLG
per-IP polling sounds good, <provided the limit isn't low>, but I'm afraid the archive dump isn't really an option for me.

In your signature you mention interest in the applications that use the API, so here's the link to mine, I just started it so it might be a couple of days until it's done but I guess you understand the idea behind it.

https://github.com/SimplyBLGDev/NARCover

Re: API Request

Posted: Sat Aug 15, 2020 8:10 am
by Zer0xFF
SimplyBLG wrote:
Sun Aug 09, 2020 10:56 pm
one for every game that I need to download the image from (ByGameName to find it's id) and another one to find the images urls (which simultaneously requests every ID to not use up the request limit).

Thanks
you can improve this pattern by 1st collecting the IDs through `ByGameName`, then batch requests images with `Images?id=1,12,3,546,et` batch requesting is considered 1 request per page, and each page can display 20 (?) images... note, even though it can only display 20, you should put as many IDs in the request, then use pages to collect all the link.

if i may ask, how do you get a games name? because if you're able to get a games serial no, we can add those to DB, then you can avoid using `ByGameName` and use batch request though `ByGameUniqueID` (note we dont have UID aka serials enabled for any Nintendo console, but if you have a list we can add them)

Re: API Request

Posted: Sat Aug 15, 2020 2:33 pm
by SimplyBLG
I only scan for filenames within a folder, so I have a procedure to simplify that filename to get the game's name, you can check the method in the git 'Utils.cs' script but basically it removes region/quality indicators (like (U), (E), (J), [!], [ b ]) then it removes serial numbers (like '1234 - Gamename.rom') then it repositions anything after a comma (this one is harder to explain but you know how for sorting sake some titles are written as 'Legend of Zelda, The', so I put that 'The' back at the beginning) and then search that name in your db.

PS:. I am doing a batch request for the images once I've got all the IDs, I wasn't aware of the pages thing, I'll have to look into that. If there's something I'd add to the DB is aliases, for example if I search for 'Final fantasy 4' I won't get the expected results cause it should be 'Final Fantasy IV' and that sort of thing.