package com.github.ramonrabello.kiphy.trends.data

import com.github.ramonrabello.kiphy.trends.TrendingApi
import com.github.ramonrabello.kiphy.trends.model.TrendingResponse
import io.reactivex.Single

interface TrendingDataSource {

    fun loadTrending(): Single<TrendingResponse>

    class Remote(private val api: TrendingApi) : TrendingDataSource {

        override fun loadTrending() =  api.loadTrending()

    }
}
package com.github.ramonrabello.kiphy.trends.data

import com.github.ramonrabello.kiphy.trends.TrendingApi
import com.github.ramonrabello.kiphy.trends.model.TrendingResponse
import io.reactivex.Single

interface TrendingDataSource {

    fun loadTrending(): Single<TrendingResponse>

    class Remote(private val api: TrendingApi) : TrendingDataSource {

        override fun loadTrending() = api.loadTrending()

    }

    class Local : TrendingDataSource {

        override fun loadTrending() = Single.fromCallable { TrendingResponse((emptyList())) }

    }
}
Add Local inner class as stub just to be used by repository.
Add Local inner class as stub just to be used by repository.

ramonrabello/Kiphy