-
-
Save skydoves/6ee75e14fb49eb49c2f9d3a6ca71b39d to your computer and use it in GitHub Desktop.
call_adapter_factory_usecase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface PosterService { | |
@GET("DisneyPosters.json") | |
suspend fun fetchPosters(): NetworkResult<List<Poster>> | |
} | |
class PosterRemoteDataSource( | |
private val posterService: PosterService | |
) { | |
suspend operator fun invoke(): NetworkResult<List<Poster>> { | |
return posterService.fetchPosters() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment