DanTheMan827/ntag215-puck.js

Amiibo info support

christopher-roelofs opened this issue · 3 comments

On my fork I added support for the json from https://amiiboapi.com/api/amiibo/. It adds the file directly to the project but with how unfrequently amiibo get added, I figured it was better than trying to make a call for the json and cache in in the browser.

My end goal is to have that info get sent back to an array on the device (also backed by json file) and keep the main info like character, game series and amiibo series on the device for the tags that have been loaded. I'm not sure what direction you want to take the project but I would rather see that kind of feature added to the main branch and have better support for both puck and pixl instead of having a different branch. Le me know your thoughts.

I'm planning on refactoring the write to flash code so that file names can be set and the user could rename as desired.

example:

001.Pikachu
002.Kirby
003.Pokemon Trainer

And also implementing a menu for the pixl.js with slot names based on the file names

Cool. I'm less concerned about the filename on the device as there is no good way to grab the files directly (at least that an end user would want to use) so for the download button in your webapp, I set the filename to the character name so you could store/reupload from a phone. Would you consider adding all the relevant info (not just the name) a device would want to use in the response back to the device? Right now, I have json files with all the amiibo based on id and load the data file files dynamically during the slot cycle which is not a good long term solution. I already had to disregard the info for animal crossing and make them all say generic "Animal Crossing" for each one because there are so many. I'll wait to see what you come up with and go from there :). Thanks for all your work on this.

When I get names implemented, I will extend the get tag info function so that it returns the name set as well as the subset of the tag itself.

I've asked N3evin if they could enable github pages so that URLs like this could be used since they're a bit more cacheable for browsers.
https://n3evin.github.io/AmiiboAPI/database/amiibo.json
https://n3evin.github.io/AmiiboAPI/images/icon_01c10000-02440502.png

If the file name is prefixed with ###., that will leave 28 ASCII characters that can be set, less if UTF-8 is used.