I just grabbed the curl code snippet from the WK docs and went off with bash. Should’ve used something else as you suggested
Here’s the Python version of the script for those who don’t use Linux:
import requests
API_KEY = "<API_KEY>"
kana_vocabs = (9176, 9177, 9178, 9179, 9180, 9181, 9182, 9183, 9184, 9185, 9186, 9187, 9188, 9189, 9190, 9191, 9192, 9193, 9194, 9195, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203, 9204, 9205, 9206, 9207, 9208, 9209, 9210, 9211, 9212, 9213, 9214, 9215, 9216, 9217, 9218, 9219, 9220, 9221, 9222, 9223, 9224, 9226, 9227, 9228, 9229, 9230, 9231, 9232, 9233, 9234, 9235, 9236)
for subject_id in kana_vocabs:
response = requests.post(
"https://api.wanikani.com/v2/reviews",
headers={
"Wanikani-Revision": "20170710",
"Content-Type": "application/json; charset=utf-8",
"Authorization": f"Bearer {API_KEY}",
},
json={
"review": {
"subject_id": subject_id,
"incorrect_meaning_answers": 0,
"incorrect_reading_answers": 0,
},
},
)
has_error = "error" in response.text
if not response.ok or has_error:
print(f"Could not update {subject_id}")
else:
print(f"{subject_id} has been marked as correct")
print(response.text)