0

I am trying to work with the TheMovieDB found here.

Within this database, I am hoping to obtain access to images and descriptions of movies.

I understand that wit RetroFit, you must create an API Interface for the associated @GET request.

I am trying to determine the model class I should create for my TheMovieDatabase to pass into my RetroFit API interface. I am unsure if this is something I should be looking for on TheMovieDatabase documentation or if I can create a standard POJO:

public interface ApiInterface{
    @GET("""""""");
    Call<TheMovieDatbase> getImages(@Query("text") String query);

}

Any help or advice is appreciated.

tccpg288
  • 3,242
  • 5
  • 35
  • 80
  • You have to look into the Web API you're trying to use. Lean on some API development program (like https://www.getpostman.com/) to get an idea of how responses look like. After that, see https://square.github.io/retrofit/#restadapter-configuration on how to register the converter to deserialize your data. – Eddie Lopez Jun 02 '18 at 02:55
  • Got it - The Movie Database appears to have limited information on how to structure. – tccpg288 Jun 02 '18 at 02:58
  • Based on this post below it looks like I must make a POJO for the "group" of responses and then a serializable model that matches the actual JSON https://stackoverflow.com/questions/38694564/android-retrofit-pojo-model?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – tccpg288 Jun 02 '18 at 03:25

0 Answers0