Recently, I’ve noticed that web applications or extensions that interact with Wanikani’s API all use their own implementations of interaction. What this means is that any time someone wants to create a new web-based application, they need to either copy someone else’s code and finangle it to work with their own apps, or reinvent the wheel.
So, as a Typescript learning exercise to myself, and as a service to others, I have written a self-contained library that will handle all facets of interaction with the Wanikani API, include JSONP requests, caching, throttling, and more. The library has no external dependencies, except perhaps an ES6 Promise polyfill.
In order to use this library, one simply instantiates a WkApi object with the user’s API Key, and gets access to all types of API information.
Please take a look.
I am open to suggestions or improvements. I am by no means an experienced library developer (all my time has been on discrete projects), and this is my first foray into writing open-source software.