package com.fk.fuckoffer.injection

import dagger.Module
import dagger.Provides
import retrofit2.Retrofit
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
import retrofit2.converter.moshi.MoshiConverterFactory


/**
 * Created by fk on 22.10.17.
 */
@Module class NetworkModule {

    @Provides fun retrofit() = Retrofit.Builder()
            .baseUrl("https://www.foaas.com")// TODO move to a cozy place for constants
            .addConverterFactory(MoshiConverterFactory.create())
            .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
            .build()
}