Refactor data sources and feed model
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
enum WinnerType: String, Codable, CaseIterable {
|
||||
enum FeedItemType: String, Codable, CaseIterable {
|
||||
case weatherAlert = "WEATHER_ALERT"
|
||||
case weatherWarning = "WEATHER_WARNING"
|
||||
case transit = "TRANSIT"
|
||||
@@ -15,23 +15,6 @@ enum WinnerType: String, Codable, CaseIterable {
|
||||
case info = "INFO"
|
||||
case nowPlaying = "NOW_PLAYING"
|
||||
case currentWeather = "CURRENT_WEATHER"
|
||||
case calendarEvent = "CALENDAR_EVENT"
|
||||
case allQuiet = "ALL_QUIET"
|
||||
}
|
||||
|
||||
struct Winner: Codable, Equatable {
|
||||
let id: String
|
||||
let type: WinnerType
|
||||
let title: String
|
||||
let subtitle: String
|
||||
let priority: Double
|
||||
let ttlSec: Int
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case type
|
||||
case title
|
||||
case subtitle
|
||||
case priority
|
||||
case ttlSec = "ttl_sec"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user