Created
January 5, 2020 12:14
-
-
Save zafarivaev/6641bbf631c7d6dd8d81faaea9a28261 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
class QuoteDetailInteractor: PresenterToInteractorQuoteDetailProtocol { | |
// MARK: Properties | |
weak var presenter: InteractorToPresenterQuoteDetailProtocol? | |
var quote: APIQuote? | |
func getImageDataFromURL() { | |
print("Interactor receives the request from Presenter to get image data from the server.") | |
KingfisherService.shared.loadImageFrom(urlString: quote!.image!, success: { (data) in | |
self.presenter?.getImageFromURLSuccess(quote: self.quote!, data: data) | |
}) { (error) in | |
self.presenter?.getImageFromURLFailure(quote: self.quote!) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment