Right now I’m not doing any API calls. Meaning I don’t know my level or the kanji I know. I’ve gotten around this by making a big multidimension array with all the kanji ordered by wanikani level, also using a variable to store my wanikani level which I have to manually input. Obvious issues with this is that I have to manually change my level each time I level up, plus I can only use kanji from previous lessons.
The reason I’m not doing any API calls is because as far as I know, every card would do a new API. That would quickly eat up the 100 API calls allowed per hour (plus it is pretty rude to do). I had a quick look at doing it in Python for getting the information but it’s not a language I’m familiar with, so that quickly went nowhere.
Does anybody have any ideas on how to solve my problems?
I’ll probably release this as an app when I’m finished. Depending on if I can make it idiot proof or not.
What part about API calls is giving you trouble? e.g. not knowing which URLs to request? Not knowing how to do an ajax request? Not knowing when or how often to fetch data?
The problem is that I’m doing it in Anki so I would need to do a new API call every card as I don’t think the information can be stored. At least I couldn’t find anything in the manual (I might have missed it). This would mean while studying in Anki I would have to do a new API call every few seconds, which is both inefficient and not possible due to the 100 call limit an hour.
If it were a normal browser I would just throw all that information in a cookie and be done with it. In my quick test in anki, this didn’t work. Pretty sure I can’t do things like using local storage or query parameters or a database (maybe database is possible, haven’t tried).
Writing a Python addon would certainly be possible, that way you could access other cards or the database.
So realistically I have to use Python, which I kind of figured.
I’m sure I can figure most of it out. At least I think I will be able to figure out how to do an API call and store the data. As for how to access said data from a card, would really save me a lot of headaches if someone could point me in the right direction. Possibly also how to run a function on anki startup (where I would do the API call) would be nice as well. The ANKI documentation really isn’t very good.
If you can get it working, I would absolutely love to use it. I love the idea of Anki to supplement WK but like you said (kinda), if I tell it I’m level 5, it will throw in all the level 5 cards, even the ones I haven’t learned yet. Maybe I’m doing it completely wrong and just don’t understand how to use the WK deck… That’s very possible as I’m brand new to Anki… I dunno… Now I’m just rambling… I’ll see myself out…