API version 2 moving out of beta. Sunsetting API version 1

Try this for your original thing:
var raw_data = UrlFetchApp.fetch("https://www.wanikani.com/api/user/d8fd194bf2f2b9f7275b795f62e4b13e/srs-distribution",


Thank you, it is much clearer now!

Based on the API docs, this v2 API query may be useful.

https://api.wanikani.com/v2/assignments?srs_stages=5&subject_types=kanji

Assuming you properly authenticate it with your v2 key, this would return assignments at SRS stage 5 which are kanji.

Do note that the categories Guru, Master, etc. will be removed from WaniKani in the near future.

1 Like

Thanks a lot for your answer. Regarding the first line. I have the quotes in my original script but could not find the proper ones to put on the post…
Thanks for the hint regarding the V2 query . Does that mean that there is no way to get the full structure (equivalent to srs-distribution) and that i need to make an API call for each of the data I want ?

I think you might be best off reading the API v2 documentation as it describes in detail which requests you can make and which data you will receive on which request. Once you start playing around with it, you will probably see much clearer which API endpoints you need to hit.

3 Likes

You are right… unfortunately I tried to look at it but all this is a bit too cryptic for me…:frowning: .
I managed to copy a script and adapt to my need base don assumtpions but I have no clue on data structures nor anything…so I thought that for someone with skills in computer science this would be quite trivial to help me …this is why, after having read the API doc, I post my query on the forum… sorry to have so little knowledge of computing science… I started Wanikani to learn Japanese and was quite happy to find some ressoures to help me with my progression. Now with the change in API i am afraid this will no longer work and I am asking for help from knowledgeable people…

1 Like

Those categories will no longer exist at all in a month due to the introduction of multiple SRS systems with varying numbers of stages, so you may want to see if there is any point in your script at all.

Thanks for your answer. In fact the categories names have very little importance for me…what I want to monitor/ keep track of is my progress… so if instead of the number of kanji at Guru level I need to check for kanji at SRS stageX this is exactly the same.

What I need is to understand how to get the daily status of the SRS stage of my kanji, my vocabulary and my radical. Then based on that I will decide which one is relevant and again we have today 10 SRS stages and with the new version there will be 10 SRS stages so I do not see much of a difference.

The only difference is the change of data structure that impact my ability to follow my progress and for this I am asking for help…

The script helps me build this kind of data and charts

So you see still relevant no matter how the SRS stages are called.
Thanks a lot in advance for any help that you could give me
Philippe

The Dashboard Apprentice script is close to what you need. It collects the items in the four apprentice stages but it is a simple change to collect the items for all stages when you know how to do the apprentice. I suggest you take a look at this code to see how it is done. Tampermonkey lets you open a script in an editor where you can inspect it.

4 Likes

Or even easier, you can see the script’s code directly in Greasyfork: Wanikani: Dashboard Apprentice - Source code

4 Likes

Never say I didn’t do anything for you.

13 Likes

WHy would I. You did EVRYTHING for me. Have a nice day

7 Likes

What do you think about Swagger / OpenAPI (with generated *.json / *.yaml)? I don’t really need it; however, it can be used to strongly type the REST API.

This is as far as I currently need, including rate-limiting.

1 Like

How do I get this topic to stop showing up at the top of the community section on the dashboard? Unpinning it or setting it to normal don’t seem to work.

I dont think you can since this is globally pinned by the admins

I have this thread unpinned, and it doesn’t appear at the top of the latest threads for me :thinking:

4 Likes

Oh! Well then i dont know :confused:

I meant the community section of the wk dashboard, not the forums.

I didn’t know people used that feature. :joy:

I doubt that list is customized per user, so that’s probably why you’re still seeing it.

7 Likes

Right now, there’s no Swagger API.
(That’s sad because with a single Swagger file, you can use it everywhere, including Postman !!)
In fact, I had to scrap the API webpage to generate all routes for Postman

You can use it at your convenience !

BTW, I’m a senior js/ts dev. Do you need a hand on your project ? :wink:

Actually, what I interested in most right now is creating an Anki that is only accessible to WaniKani’ers, for usage on mobile. (If I make a full blown Anki deck, there might be legal implications…)

This actually. [Userscript] Self-Study Quiz – and if you please https://community.wanikani.com/t/chinese-vocab-generated-level-per-level-via-wanikani-contents/45063

I did try to make a generic Anki alternative, but that is less of priority.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.