Created
June 18, 2019 08:26
-
-
Save bpisano/d5a47957b28804cda3a65de2d82afd05 to your computer and use it in GitHub Desktop.
Embedded code in my Weather article on Medium
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
| struct DailyWeather: Codable, Identifiable { | |
| var id: Date { | |
| return time | |
| } | |
| var time: Date | |
| var maxTemperature: Double | |
| var minTemperature: Double | |
| var icon: Weather.Icon | |
| enum CodingKeys: String, CodingKey { | |
| case time = "time" | |
| case maxTemperature = "temperatureHigh" | |
| case minTemperature = "temperatureLow" | |
| case icon = "icon" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment