Created
November 8, 2018 04:14
-
-
Save vialyx/4247645286c42c5dfafcbfedb249e2f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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