Skip to content

Instantly share code, notes, and snippets.

@hassanvfx
Created October 2, 2019 00:20
Show Gist options
  • Save hassanvfx/f14a1b85995032203ccf3dff766a0890 to your computer and use it in GitHub Desktop.
Save hassanvfx/f14a1b85995032203ccf3dff766a0890 to your computer and use it in GitHub Desktop.
// Getting a single object
Services.api.rx.call(.getMovie(mid))
.subscribe(onSuccess: { completion($0) })
.disposed(by: diposeBag)
// Getting a list
Services.api.rx.call(.getMovieRelated(mid))
.subscribe(onSuccess: { [weak self] (response:APIResponseMovieList) in
self?.movies = response.items()
}).disposed(by: disposeBag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment