// Path: 2016-06-15_hot_and_cold/app/src/main/java/com/gdgand/rxjava/rxjavasample/hotandcold/data/imgur/ImgurApi.java
// public interface ImgurApi {
// 
// 	@GET("/3/topics/defaults")
// 	Observable<TopicResponse> defaultTopics();
// }


import com.gdgand.rxjava.rxjavasample.hotandcold.data.imgur.ImgurApi;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.CallAdapter;
import retrofit2.Converter;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import javax.inject.Singleton;
	@Provides
	@Singleton
	public CallAdapter.Factory callAdapterFactory() {
		return RxJavaCallAdapterFactory.create();
	}

	@Provides
	@Singleton
	public OkHttpClient okHttpClient() {
		HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
		interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

		return new OkHttpClient.Builder()
			.addInterceptor(interceptor)
			.build();
	}

	@Provides
	@Singleton
	public Retrofit retrofit(OkHttpClient client, CallAdapter.Factory callAdapterFactory, Converter.Factory converterFactory) {
		return new Retrofit.Builder()
			.baseUrl("https://api.imgur.com")
			.client(client)
			.addCallAdapterFactory(callAdapterFactory)
			.addConverterFactory(converterFactory)
			.build();
	}

	@Provides
	@Singleton
// Path: 2016-06-15_hot_and_cold/app/src/main/java/com/gdgand/rxjava/rxjavasample/hotandcold/data/imgur/ImgurApi.java
// public interface ImgurApi {
// 
// 	@GET("/3/topics/defaults")
// 	Observable<TopicResponse> defaultTopics();
// }


// Path: 2016-06-15_hot_and_cold/app/src/main/java/com/gdgand/rxjava/rxjavasample/hotandcold/di/module/DataModule.java
import com.gdgand.rxjava.rxjavasample.hotandcold.data.imgur.ImgurApi;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.CallAdapter;
import retrofit2.Converter;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import javax.inject.Singleton;

	@Provides
	@Singleton
	public CallAdapter.Factory callAdapterFactory() {
		return RxJavaCallAdapterFactory.create();
	}

	@Provides
	@Singleton
	public OkHttpClient okHttpClient() {
		HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
		interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

		return new OkHttpClient.Builder()
			.addInterceptor(interceptor)
			.build();
	}

	@Provides
	@Singleton
	public Retrofit retrofit(OkHttpClient client, CallAdapter.Factory callAdapterFactory, Converter.Factory converterFactory) {
		return new Retrofit.Builder()
			.baseUrl("https://api.imgur.com")
			.client(client)
			.addCallAdapterFactory(callAdapterFactory)
			.addConverterFactory(converterFactory)
			.build();
	}

	@Provides
	@Singleton
	public ImgurApi imgurApi(Retrofit retrofit) {