-
-
Save thexande/2826023dd61f131bc4cfb72b2eb47874 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
public enum World { | |
public enum StoreError: Error { | |
case parsing | |
case network | |
} | |
public struct CountryLite: Hashable { | |
public let code: String | |
public let name: String | |
public let emoji: String | |
} | |
public struct CountryDetail: Hashable { | |
public struct Language: Hashable { | |
public let name: String | |
public init(name: String) { | |
self.name = name | |
} | |
} | |
public struct Continent: Hashable { | |
public let name: String | |
public init(name: String) { | |
self.name = name | |
} | |
} | |
public let code: String | |
public let name: String | |
public let currency: String | |
public let phone: String | |
public let emoji: String | |
public let languages: [Language] | |
public let continent: Continent | |
public init(code: String, | |
name: String, | |
currency: String, | |
phone: String, | |
emoji: String, | |
languages: [Language], | |
continent: Continent) { | |
self.code = code | |
self.name = name | |
self.currency = currency | |
self.phone = phone | |
self.emoji = emoji | |
self.languages = languages | |
self.continent = continent | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment