Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: add streaming to getAnimeSearch #529

Open
chrisgrieser opened this issue Apr 27, 2024 · 4 comments
Open

FR: add streaming to getAnimeSearch #529

chrisgrieser opened this issue Apr 27, 2024 · 4 comments
Labels
api.jikan.moe Related to the public REST API or MyAnimeList and probably not a bug/code issue feature question

Comments

@chrisgrieser
Copy link

Thanks for this nice API! I am currently working on a small Alfred plugin to search for anime.

One thing I'd like to do is to add the streaming sites available. While streaming is listed when requesting information on an individual MAL entry, it is omitted in the results for getAnimeSearch. This makes it necessary to send a separate request for each MAL entry found, which is kinda cumbersome (and also hits the API rate limit quickly).

Could streaming be added to the results from getAnimeSearch?

@pushrbx pushrbx transferred this issue from jikan-me/jikan Apr 29, 2024
@pushrbx pushrbx added question api.jikan.moe Related to the public REST API or MyAnimeList and probably not a bug/code issue labels Apr 29, 2024
@pushrbx
Copy link
Collaborator

pushrbx commented Apr 29, 2024

I did a quick triage on this, and it's possible to do. We only have to update this array to map in the "streaming" attribute, as it's already being pulled by the parser for the main MAL page of anime entries: https://github.com/jikan-me/jikan-rest/blob/master/app/Http/Resources/V4/AnimeResource.php#L256

However after the update, in the mongodb all items needs to be expired so all items would be scraped again.

@pushrbx
Copy link
Collaborator

pushrbx commented Apr 29, 2024

Side note just for your interest @chrisgrieser: I think Raycast does the same thing as Alfred. It already has the extension for searching anime through jikan api: https://github.com/raycast/extensions/blob/main/extensions/myanimelist-search/src/components/searchAnimeList.tsx#L14

@irfan-dahir
Copy link
Contributor

There are some other common data that are not returned in the initial objects either (like related, themes, external) so we could size down the JSON complexity and size. If we're to allow for streaming, we'd have to look into those too. i think the best approach for this would be the addition of the optional/additional data params

@pushrbx
Copy link
Collaborator

pushrbx commented Apr 30, 2024

for this would be the addition of the optional/additional data params

I think we discussed something similar here: #493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api.jikan.moe Related to the public REST API or MyAnimeList and probably not a bug/code issue feature question
Projects
None yet
Development

No branches or pull requests

3 participants