wow, having an api is great. I like to build a VUE application for monitoring my progress.
The overview page has a statistics about how many items each stage holds at the moment.
Apprentice: x kanji, y vocab, z radicals
Guru: …
I have not found the api request to get these numbers.
You could use the subjects endpoint with a level filter. GET https://api.wanikani.com/v2/subjects?levels=<level>
You’ll need to count them yourself though, looking at the object property for each item.
The possible values are radical, kanji, and vocabulary
That’ll do it with one request. If you want to be lazy, and spend 3 requests, you can just filter the subjects by both level and type, and use the response.total_count value. For example:
Do you want to study the items so you can move them out of apprentice? There are two solutions that you could use.
The Item Inspector script mentioned in the previous post can be configured to display the reading and meaning of items in a tooltip. You go recite the meaning and reading of items and check if you got them right by displaying the tooltip. If you click on the item the item page will display. This is handy if you have business with the mnemonics.
If you prefer studying with a quiz you can use the Self-Study Quiz. You must configure a preset with the SRS Level filter to select the apprentice items.
The Heatmap script does some of that. It displays a calendar and if you click on a day it displays the activity for the day with useful statistics.
If after all my suggestions you still want to write your own code I suggest you read existing scripts to see how it is done. That is how most scriptwriters have learned how to write scripts. At least this is how I have learned how to write mine. Tampermonkey provides the option to open a script in an editor where you can read it.
I suggest you begin with Dashboard Apprentice I have mentioned before. This script is a rather easy read and it is close to what you want to do. You will learn how to use the Open Framework which is something I recommend. It includes a wrapper that takes care of the messy details of extracting the data from Wanikani, including cache and rate limits. Most scripts use it nowadays.