-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Renamed HPOpenWeather to OpenWeather - Updated some method signatures - greatly simplified decoding of responses which improves readability - added more documentation comments - added alerts
- Loading branch information
1 parent
6087a1e
commit 7a81c06
Showing
33 changed files
with
617 additions
and
604 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Foundation | ||
|
||
/// Type that holds information about weather alerts | ||
public struct Alert: Codable, Hashable, Equatable { | ||
|
||
/// Name of the alert source. Please read here the full list of alert sources | ||
public let senderName: String | ||
/// Alert event name | ||
public let eventName: String | ||
//// Date and time of the start of the alert | ||
public let startDate: Date | ||
//// Date and time of the end of the alert | ||
public let endDate: Date | ||
/// Description of the alert | ||
public let description: String | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case senderName = "sender_name" | ||
case eventName = "event" | ||
case startDate = "start" | ||
case endDate = "end" | ||
case description | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
Oops, something went wrong.