Created
January 14, 2022 15:42
-
-
Save vikasmain/f8d6ef79c206ebc659dc6b6fb6b830e3 to your computer and use it in GitHub Desktop.
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
@MovieActivityScope | |
class MovieModel @Inject constructor( | |
private val movieApi: MovieApi | |
) { | |
fun callMoviesApi(): Flow<MovieListResponse> { | |
return flow { | |
val carbonOffsetResponse = movieApi.getMoviesList("a427cfb730b4a73e67c646d8b44dd216") | |
emit(carbonOffsetResponse) | |
}.flowOn(Dispatchers.IO) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment