If you are interested in having your WaniKani API driven project hosted under the Github community repo, let me know. Only stipulation is that it must be open source.
To do list
Create API mailing list
Create section under Community to highlight community repos
I would second the 2 above.. knowing that new reviews are due is nice but like some have said it's weird to constantly get the 5 minutes, 20 minutes, then 3 hours situation.. alot of times it would be nice to know that yeah you could review in 5 minutes but then would be on a refresh/review cycle for the next hour.. if you waited an hour you could review all 20 or something at once.. I dunno seems like something like that could be useful for those with limited times available to study..
Couple of suggestions from my experience. For reference I’ve done a bit of work on rails APIs before, but I’m no guru.
Version the API
For instance put the API controllers in app/controllers/api/v1/ and namespace them “class Api::V1::ApiController < ActionController::Base”
This means if/when you need to drastically change the API you just make an app/controllers/api/v2/
Yes this means duplicating API code, but it stops you breaking anything relying on V1 of the API and you can gracefully move people away from the old versions.
It also means you can add fixes/changes to old versions very easily because the code is completely separate.
There may be more elegant ways to version it but this is how I handled it for a small API
Your API routes would also contain the version e.g. /api/v1/users
This makes using json a lot easier and allows you to expose only the attributes you want to
You can also present/decorate the data here, so converting dates into different formats etc
If you have user roles/rights you can restrict attributes here too
I would namespace these as well since between api versions you might change/remove/add attributes in a serializer. So app/serializers/api/v1/api_serializer.rb would contain “class Api::V1::ApiSerializer < ActiveModel::Serializer”
Rate limit the amount of calls that can be done by a key/IP
Stops a rogue app eating up resources like a cookie monster
Regarding the email addresses, you could always return the gravatar hash in the user api call. It doesn’t expose the email directly and the hashes are public anyway, so nobody can complain.
How about Demoted items list for Radicals, Kanji and Vocabulary? I would want to know the number of items that have been demoted, reading or meaning failure rate and most recent demotion date.
Full disclosure: I’m only interested in this to build a personal drinking game I would run once a week. Just to punish me for my failures. Either way, I can see a few other options for making my own drinking game with what’s already available to reward my successes.
I think we all know what data is relevant :D The rest is secondary. At least if we’re taking about notifications. But if anyone is having plans to do other things, please do so
I would second the 2 above.. knowing that new reviews are due is nice but like some have said it's weird to constantly get the 5 minutes, 20 minutes, then 3 hours situation.. alot of times it would be nice to know that yeah you could review in 5 minutes but then would be on a refresh/review cycle for the next hour.. if you waited an hour you could review all 20 or something at once.. I dunno seems like something like that could be useful for those with limited times available to study..
Here's an idea. what if the system notifies the user there are reviews waiting for him when the number of all reviews gets higher than, dunno 30, 40, 50 (depending from the level of the user of course)
So let's say, when there's a review, the app checks if the number of old and new reviews adds together a number specified (like 30, 40, or even 5).
so if a user doesn't get 30 reviews after 6 hours, he doesn't get a notification...