Instantly share code, notes, and snippets.

@fitomad /docs-parameter.swift Secret
Last active Dec 3, 2018

Embed
What would you like to do?
/**
This is the place where all the requests happends.
There some `StoreRequest` parameters combinations that
return no results. That's not an error. It's simply that
the combination it's not available at the **iTunes Store**
- Parameters:
- request: Search parameters combination
- handler: Results will be put at this place.
- SeeAlso: song(named:completionHandler:), movie(named:completionHandler:) and book(named:completionHandler:)
*/
private func storeRequest<T: Codable>(_ request: StoreRequest, handler: @escaping iTunesCompletionHandler<iTunesResult<T>>) -> Void
{
guard let countryCode = self.countryCode else
{
handler(iTunesResult.error(message: "Where are you from?"))
return
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment