How to get the actual item?

This is going to be potentially very dumb, but how do I actually get the item itself? As in, the string. I can get and use the item ids to get various information about each item, but I have no idea how to go from the id to “駅前”, for example.

Am I overlooking something? This seems like a very basic thing.

1 Like

If you’re not using WKOF you’ll have to query the subject endpoint with the subject ID from the assignment

2 Likes

I’m using WKOF, did I miss something there?

1 Like

Then you can use the subject ID to get the WKOF item which stores the item string in item.data.characters

2 Likes

Thank you! I’ve been trying to write this script at work where I don’t have access to tampermonkey and it’s proving to be a struggle not being able to figure this stuff out through testing.

1 Like

WaniKani API advises to cache Subject endpoint, for later on, as well.

Otherwise, the API has rate limiter, like 60/min.

I am not sure if wkof can be used as a library, without TamperMonkey?

1 Like

I’ll keep this in mind, thanks! I need more API practice anyway.

Oh I just mean that because I get a lot of free time at my job, I figured I’d use it to do the bulk of the coding for the script. I’ll move it back to tampermonkey when I want to start testing it, but a lot of it I can just write in something like codepen.

1 Like