Skip to content

Instantly share code, notes, and snippets.

@sberoch
Created July 13, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sberoch/b439ced113c4346eb1dd2833686e9d53 to your computer and use it in GitHub Desktop.
Save sberoch/b439ced113c4346eb1dd2833686e9d53 to your computer and use it in GitHub Desktop.
class CharacterRemoteDataSource @Inject constructor(
private val characterService: CharacterService
): BaseDataSource() {
suspend fun getCharacters() = getResult { characterService.getAllCharacters() }
suspend fun getCharacter(id: Int) = getResult { characterService.getCharacter(id) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment