Skip to content

Instantly share code, notes, and snippets.

@indragiek
Last active December 10, 2020 03:31
Show Gist options
  • Save indragiek/08f1b35251abef8b5e23cde6ffd25b32 to your computer and use it in GitHub Desktop.
Save indragiek/08f1b35251abef8b5e23cde6ffd25b32 to your computer and use it in GitHub Desktop.
The code change to enable batch loading of all data up-front in a single HTTP request.
@@ -287,7 +287,7 @@ class MovieDetailViewController: UIViewController, UIScrollViewDelegate, MovieDe
private func fetchMovieDetails() {
let spanName = "fetch-movie-details"
Specto.startSpan(spanName)
- client.getMovieDetails(movie: movie) { result in
+ client.getMovieDetails(movie: movie, additionalData: [.credits, .videos]) { result in
switch result {
case let .success(details):
self.details = details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment