Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class GetPopularMovies(private val moviesApi: MoviesApi)
: UseCase<PopularMovies, UseCase.None>() {
override suspend fun run(params: None): Either<Exception, PopularMovies> {
return try {
val movies = moviesApi.getPopularMovies().toModel()
} catch (e: Exception) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.