Skip to content

Instantly share code, notes, and snippets.

@Otbivnoe
Last active September 11, 2017 15:51
Show Gist options
  • Save Otbivnoe/c042a9ef1851b5c00eeed57df34a7266 to your computer and use it in GitHub Desktop.
Save Otbivnoe/c042a9ef1851b5c00eeed57df34a7266 to your computer and use it in GitHub Desktop.
login(username: "Username", password: "Password")
.flatMap { [weak self] user -> Observable<[Post]> in
guard let `self` = self else {
return Observable.empty()
}
return self.loadPosts(for: user)
}
.subscribe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment