PlayerAndroid/app/src/main/java/code/name/monkey/retromusic/Injection.kt

24 lines
750 B
Kotlin
Raw Normal View History

2018-11-30 01:06:16 +00:00
package code.name.monkey.retromusic
import code.name.monkey.retromusic.providers.RepositoryImpl
import code.name.monkey.retromusic.providers.interfaces.Repository
import code.name.monkey.retromusic.rest.KogouClient
import code.name.monkey.retromusic.rest.service.KuGouApiService
import code.name.monkey.retromusic.util.schedulers.BaseSchedulerProvider
import code.name.monkey.retromusic.util.schedulers.SchedulerProvider
object Injection {
fun provideRepository(): Repository {
return RepositoryImpl.getInstance()
}
fun provideSchedulerProvider(): BaseSchedulerProvider {
return SchedulerProvider.getInstance()
}
fun provideKuGouApiService(): KuGouApiService {
return KogouClient().apiService
}
}