Created
September 4, 2021 21:01
-
-
Save fipso/3457823a9519db5b14d2ce3d84924272 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 Foundation | |
struct Temperatures: Codable { | |
let data: DataClass | |
} | |
struct DataClass: Codable { | |
let de: De | |
enum CodingKeys: String, CodingKey { | |
case de = "DE" | |
} | |
} | |
struct De: Codable { | |
let isoAlpha2, name, continent: String | |
let advisory: Advisory | |
enum CodingKeys: String, CodingKey { | |
case isoAlpha2 = "iso_alpha2" | |
case name, continent, advisory | |
} | |
} | |
struct Advisory: Codable { | |
let score: Double | |
let sourcesActive: Int | |
let message, updated: String | |
let source: String | |
enum CodingKeys: String, CodingKey { | |
case score | |
case sourcesActive = "sources_active" | |
case message, updated, source | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment