LetrixZ / animethemes-api

https://animethemes-api.herokuapp.com
17 stars 3 forks source link

Get [theme_id] of all songs #10

Closed Chortowod closed 3 years ago

Chortowod commented 3 years ago

Hey! Sorry for bothering but is there a way to get all song's ID (theme_id) at once? And I don't get how to get last added animes/themes. https://animethemes-api.herokuapp.com/api/v1/latest is ok but https://animethemes-api.herokuapp.com/api/v1/latest/animes and https://animethemes-api.herokuapp.com/api/v1/latest/themes leads to Not Found. Or, for example, I want to get all songs after specific song ID (theme_id) using pages if there is lot of them.

I know I'm asking too much but if you could make the 1st feature - get all theme_id - it would be awesome! It's all I need...

LetrixZ commented 3 years ago

By all theme_id's, do you mean, all IDs for an anime or all in the database? EDIT: I added those two latest added functions. They were also available before by using arguments in the request. For example: https://animethemes-api.herokuapp.com/api/v1/latest?type=theme&limit=25 or https://animethemes-api.herokuapp.com/api/v1/latest?type=anime&limit=10

Chortowod commented 3 years ago

Thanks! Works great. I mean all in the database. If it stored in one place it won't be a problem, but if it parse site for every theme_id - I suppose it would be long, right?

LetrixZ commented 3 years ago

Because the anime and themes are in separate tables, and because I'm using a free database, if you want all in the database, I can only give you the basic info without matches (anime with the list of theme-id's). Added

Chortowod commented 3 years ago

That's all I needed, thank you so much! I appreciate that!

LetrixZ commented 3 years ago

I made the lists to be cached with Redis to avoid timeouts. Only not paginated lists are the most recent data.