Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created November 8, 2018 04:14
Show Gist options
  • Save vialyx/4247645286c42c5dfafcbfedb249e2f0 to your computer and use it in GitHub Desktop.
Save vialyx/4247645286c42c5dfafcbfedb249e2f0 to your computer and use it in GitHub Desktop.
import UIKit
final class ViewController: UIViewController {
let repository = Repository(apiClient: APIClient())
override func viewDidLoad() {
super.viewDidLoad()
repository.getFlights { (result) in
switch result {
case .success(let items):
print("\(self) retrive flights: \(items)")
case .failure(let error):
print("\(self) retrive error on get flights: \(error)")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment