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

[REQUEST] Create the constructor Media.fromId(id) #7

Open
rignaneseleo opened this issue Jul 5, 2020 · 2 comments
Open

[REQUEST] Create the constructor Media.fromId(id) #7

rignaneseleo opened this issue Jul 5, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@rignaneseleo
Copy link

Hi, thanks for this library. It works well.
I'd like to put media's IDs into my db and show the pictures using queries.

Now the only way is to load the whole list and then get the value with a .where() function.

Can you either give us a Map<int,Media> where the key is the ID or a constructor method called Media.fromId(id) that basically builds the Media from the id?

Thanks

@aloisdeniel aloisdeniel added the enhancement New feature or request label Jul 8, 2020
@aloisdeniel
Copy link
Owner

Yep that would be useful!

Thanks for the suggestion.

@rignaneseleo
Copy link
Author

A workaround I found is to create the Media using the .fromJson() function and passing an ID and type to that.
It works but it would be better a dedicated method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants