Created
June 26, 2019 14:44
-
-
Save jpcarreira/84b69f13678d9dc35226dc3a1436c05f to your computer and use it in GitHub Desktop.
This file contains 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
final class MockApiClient: Api { | |
private static let delay = 5 | |
func fetchMovies(completion: @escaping (Bool, FilmsData?) -> Void) { | |
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(MockApiClient.delay)) { | |
// mock your data as before, but now we have a simulated 5-second delay | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment