package com.nispok.tmdb;

import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

public class Tmdb {

    private static final String BASE_URL = "https://api.themoviedb.org/3/";

    private TmdbService service;

    public Tmdb() {
        HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
        loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

        OkHttpClient client = new OkHttpClient.Builder()
                .addInterceptor(loggingInterceptor)
                .build();

        Retrofit retrofit = new Retrofit.Builder()
                .client(client)
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .baseUrl(BASE_URL)
                .build();

        service = retrofit.create(TmdbService.class);
    }

    public TmdbService getService() {
        return service;
    }

}

@@ -19,16 +19,124 @@
 .tmdb;%0A%0A
+import com.google.gson.FieldNamingPolicy;%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.GsonBuilder;%0A%0A
 import o
@@ -778,32 +778,183 @@
      .build();%0A%0A
+        Gson gson = new GsonBuilder()%0A                .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)%0A                .create();%0A%0A
         Retrofit
@@ -1151,32 +1151,36 @@
 rFactory.create(
+gson
 ))%0A             

add gson naming policy