Skip to content

Instantly share code, notes, and snippets.

@kozmi55
Last active August 2, 2017 15:59
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 kozmi55/6271985e3f4e532d32a58ff7ccdae241 to your computer and use it in GitHub Desktop.
Save kozmi55/6271985e3f4e532d32a58ff7ccdae241 to your computer and use it in GitHub Desktop.
class UserRepository(private val userService: UserService) {
fun getUsers(page: Int) = userService.getUsers(page)
fun getDetails(userId: Long) : Single<DetailsModel> {
// TODO We will implement this method
return Single.create { emitter ->
val detailsModel = DetailsModel(emptyList(), emptyList(), emptyList())
emitter.onSuccess(detailsModel)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment