radityagumay
interface WeatherRepository { fun fetchWeather() : Single<List<Weather>> } class WeatherDataStore (private val service: WeatherService) : WeatherRepository { override fun fetchWeather() : Single<List<Weather>> { return service.fetchWeather() .compose(singleIo()) } } class WeatherPresenter (private val repository : WeatherRepository) { fun fetchWeather() { repository.fetchWeather().subscribe({ success -> // todo }, { error -> // todo }) } }
A modern programming language that makes developers happier.