Skip to content

Instantly share code, notes, and snippets.

@dangthaison91
Created May 31, 2016 20:31
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 dangthaison91/6bb43b7248a768fedc284488bc192859 to your computer and use it in GitHub Desktop.
Save dangthaison91/6bb43b7248a768fedc284488bc192859 to your computer and use it in GitHub Desktop.
// Fire API request then bindTo Tableview
searchBar
.rx_text
.throttle(0.5, scheduler: MainScheduler.instance)
.distinctUntilChanged()
.filter { $0.characters.count > 0 }
.flatMapLatest { findRepository($0) }
.flatMapLatest { repository -> [Issue] in
return findIssues(repository)
}
.filterNull()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment