掲示板 Forums - Interested in working with a renshuu API?
Top > renshuu.org > Developer corner
Page: 7 of 8
Getting the posts
Page: 7 of 8
Top > renshuu.org > Developer corner
Hello everyone, I'm working on an android widget with the API, it's still a bit raw but here is the preview of the app and of the widget:
Please remember to redact (hide) API keys when posting.
sure, the app only prints the first and lasts characters
That widget looks pretty awesome!!
As to the other issues that have been mentioned, I am now officially back from vacation, and I'll be squashing all of them in due time.
Edit: the API key is now under "renshuu API" (Tools in the menu)
I've compiled a list of renshuu api bugs in https://github.com/buruburukun/renshuu_helper
Copied here for convenience:
Adding grammar to lists and schedules doesn't seem to work
Getting certain grammar doesn't work (e.g., GET /v1/grammar/42)
Grammar search needs paging (no way to get more than 25 results)
Words/Kanji/Grammar presence is broken (schedule hasWord is always 0, word lists work though, did not test kanji or grammar lists)
Adding words/kanji to schedules works, but deleting does not, probably same cause as the previous point because hasWord is always 0
Update: all grammar GETs should work, as well as the PUT/DELETEs.
I think all that is left is the paging for the grammar (which is also missing in renshuu's grammar dictionary, so I'll get it added there first.
hey everyone, I've been a long-ish time renshuu and yomichan user, and I've always wanted to combine the two in order to add words directly from yomichan into my renshuu schedule, so now that I've been notified about this API, I've done just that. Currently, you can select a schedule in yomichan settings to be your term schedule to add words to. The kanji schedule is something I will implement later and currently doesn't work. Once you hover over words with yomichan, you can click the little renshuu logo to add the word to your schedule.
here is the link: https://github.com/polyllc/yom...
you'll have to install the extension yourself (instructions are posted) and reinstall any dictionaries and such. you'll also have to disable your other yomichan so it doesn't conflict
I hope it helps at least one other person out there, it certainly has helped me getting more words into my schedules!
I'm hoping to sacrifice my api calls in order to bulk download words so that less api calls are used to look up words, but that should come later
please do let me know if it works well and what works/doesn't work well!
hey everyone, I've been a long-ish time renshuu and yomichan user, and I've always wanted to combine the two in order to add words directly from yomichan into my renshuu schedule, so now that I've been notified about this API, I've done just that. Currently, you can select a schedule in yomichan settings to be your term schedule to add words to. The kanji schedule is something I will implement later and currently doesn't work. Once you hover over words with yomichan, you can click the little renshuu logo to add the word to your schedule.
here is the link: https://github.com/polyllc/yom...
you'll have to install the extension yourself (instructions are posted) and reinstall any dictionaries and such. you'll also have to disable your other yomichan so it doesn't conflict
I hope it helps at least one other person out there, it certainly has helped me getting more words into my schedules!
I'm hoping to sacrifice my api calls in order to bulk download words so that less api calls are used to look up words, but that should come later
please do let me know if it works well and what works/doesn't work well!
Ooh, that's pretty cool.
Any reason you made it based on yomichan instead of the more up to date yomitan?
I actually made something with the same goal but different implementation. (And haven't linked it here yet I think)
https://github.com/ikuto0815/r...
This is a program you can run in the background and provides a server that yomitan can connect to via the already included Anki-connect feature. So it works without having to modify the browser plugin.
hey everyone, I've been a long-ish time renshuu and yomichan user, and I've always wanted to combine the two in order to add words directly from yomichan into my renshuu schedule, so now that I've been notified about this API, I've done just that. Currently, you can select a schedule in yomichan settings to be your term schedule to add words to. The kanji schedule is something I will implement later and currently doesn't work. Once you hover over words with yomichan, you can click the little renshuu logo to add the word to your schedule.
here is the link: https://github.com/polyllc/yom...
you'll have to install the extension yourself (instructions are posted) and reinstall any dictionaries and such. you'll also have to disable your other yomichan so it doesn't conflict
I hope it helps at least one other person out there, it certainly has helped me getting more words into my schedules!
I'm hoping to sacrifice my api calls in order to bulk download words so that less api calls are used to look up words, but that should come later
please do let me know if it works well and what works/doesn't work well!
Ooh, that's pretty cool.
Any reason you made it based on yomichan instead of the more up to date yomitan?
I actually made something with the same goal but different implementation. (And haven't linked it here yet I think)
https://github.com/ikuto0815/r...
This is a program you can run in the background and provides a server that yomitan can connect to via the already included Anki-connect feature. So it works without having to modify the browser plugin.
well to be completely honest I didn't even know yomitan existed until I almost finished the yomichan version, so I just continued the yomichan version (and maybe hope to port it to yomitan later on). I kinda feel dumb that I modified the extension instead of using a much better approach that you did by just using the Anki plugin. Very cool implementation! (plus it doesn't require reinstallation of yomitan which is so so much better than the hoops you have to go through with the full extension but alas)
Well both ways have their pros and cons. Having the functionality already included in the browser plugin seems like the most convenient way for a user.
i choose that other way because it seemed like the fastest way to get something that just works well enough for me. (And I didn't want to work with JavaScript)
/grammar/search should have pagination.
If there are any issues that are still remaining, please let me know!
/grammar/search should have pagination.
If there are any issues that are still remaining, please let me know!
Kanji hasWord still doesn't work. It always returns 0 whether or not the kanji is in a schedule or list.
Just tested the grammar pagination, and it's not working well.
The following search searches for page 2 of "be", and there are 118 results total. With a page size of 20 by default, the second page should be full, but there are only 5 results. I also tested with "a" and got the same result with page 2 containing 5 results.
$ curl -s 'https://api.renshuu.org/v1/grammar/search?value=be&pg=2' -H "Authorization: Bearer $apikey" | jq '{result_count, num_grammar: .grammar | length}' { "result_count": 118, "num_grammar": 5 }
Looking into this now.
Unrelated, and I cannot remember if I brought it up before, but do most other APIs similar to this offer two-tiered keys: one for read only, and one for read/write? I saw someone working on a android widget, which is awesome, and I'd think that you'd want to keep things from having write access if it's not necessary.
Not entirely sure I want to have finer-grained perms similar to the huge number of checkboxes discord has for their bot registration page.
do most other APIs similar to this offer two-tiered keys: one for read only, and one for read/write?
I haven’t thought deeply about it, but my first reaction is that is a hack which is going to cause trouble. Authentication and access control are separate concerns which should be handled orthogonally. If you use authentication for access control you are inviting password reuse.
What I've seen other places do is allow the user to create multiple API keys.
During creation of the key, the user can decide which endpoints the key has access to and if it is r/w or only read access.
Here I am again! I'm in the process of releasing the widget app on the play store in closed test, if you are interested in testing it you can write me your gmail and I'll add you to the tester list! I've also released the source at https://github.com/EmmanueleVi...
Here I am again! I'm in the process of releasing the widget app on the play store in closed test, if you are interested in testing it you can write me your gmail and I'll add you to the tester list! I've also released the source at https://github.com/EmmanueleVi...
If you are on discord and would accept having people DM you with their email addresses, I'd be happy to make a post for this in the discord announcements channel.
Here I am again! I'm in the process of releasing the widget app on the play store in closed test, if you are interested in testing it you can write me your gmail and I'll add you to the tester list! I've also released the source at https://github.com/EmmanueleVi...
If you are on discord and would accept having people DM you with their email addresses, I'd be happy to make a post for this in the discord announcements channel.
I'm on discord as "willyrs", but to avoid the fuss of setting up emails, I've just released the app to the public, so I'd be happy if you would make an announcement to download it from here :)
Of course the code is at complete disposal if you wish to integrate it directly in the renshuu app one day!
Doesn't look like the url is up globally yet, but once it is, I'll definitely announce it!
Doesn't look like the url is up globally yet, but once it is, I'll definitely announce it!
ah, you're right, I prepared the release but I didn't press publish ahah
It will be up in a few hours!