Rapptz / jimaku

A site for hosting (Japanese) subtitles
https://jimaku.cc
GNU Affero General Public License v3.0
60 stars 3 forks source link

[Feature Request] Route for searching by AniList ID #3

Closed RadianttK closed 5 months ago

RadianttK commented 5 months ago

Feature

Motivation

Rapptz commented 5 months ago

This is possible via the API. It's /api/entries/search?anilist_id=.... Is that not enough for the use case?

RadianttK commented 5 months ago

Oh, interesting. I didn't know the website had an API. Is there a page documenting the API endpoints available?

I tried using the one you mentioned though, and got the following error:

{"error":"unauthorized","code":7}
Rapptz commented 5 months ago

The documentation is on https://jimaku.cc/api/docs

I have it linked in the footer and the account page.

RadianttK commented 5 months ago

Thanks! That looks like it would work for the purposes of a Tampermonkey script.

conquerist commented 5 months ago

@RadianttK Could you share the script when you're done? E.g. on greasyfork?

RadianttK commented 5 months ago

Hey @conquerist, I just finished the script and uploaded it to Greasy Fork here. Let me know if there are any issues or if you have any questions!

conquerist commented 5 months ago

@RadianttK Using Greasemonkey I had to replace GM_setValue by GM.setValue and the same for getValue, then it worked perfectly... Thanks!

RadianttK commented 5 months ago

Oh, interesting! I never thought to test with Greasemonkey as I assumed all Tampermonkey scripts were compatible with Greasemonkey. Thanks for letting me know, @conquerist !

Looks like GM. is compatible with both Tampermonkey and Greasemonkey, so pushed out a quick update to fix the issue.