c-eg / themoviedbapi

A Java wrapper around the JSON API provided by TheMovieDB.org
https://www.themoviedb.org/
Other
281 stars 95 forks source link

Reusing MovieDb #90

Closed xbeebx closed 5 years ago

xbeebx commented 6 years ago

I am using your library for my android app. When I request the information with your api, I get a MovieDb object, which I set into my wrapper object. So far it worked fine because I saved the values via jackson on a json file on sdcard. Now I want to replace that json file with a sqlite database. My problem: I create my wrapper object and fill it with the information from sqlite database, but when I create your object (new MovieDb()) I can't set any value because there are no set methods. How can I solve this problem?

PS: I'm not saving all of the info of MovieDb. To store it like before (as complete json string) is no option, because the performance would be very bad.

holgerbrandl commented 6 years ago

We have some setters but it lacks consistency. But I totally understand your usecase. Could you provide a PR adding the missing ones? We/you basically would need to navigate through the different model classes and let the IDE do its job. :-)

xbeebx commented 6 years ago

I have never done that before and I don't want to do something wrong. Additionally I have so much to do with my conversion from local json file to sqlite database. So it would be very nice if you could to this...

holgerbrandl commented 6 years ago

There no way to get it wrong. You need to fork the repo, apply your changes and submit them as PR. I'll review them and merge them in if they look sensible. :-) I'm pretty busy at the moment and it will/may take me a while to look into this issue.

xbeebx commented 5 years ago

Do you know when you want to create the next release (1.9)? This issue would be solved with V1.9 because as you know I added the set functions to your model classes.

holgerbrandl commented 5 years ago

Done. Thanks again for the PR.