Refactor data sources and feed model

This commit is contained in:
2026-01-10 00:25:36 +00:00
parent 1e65a3f57d
commit 324b35a464
15 changed files with 631 additions and 609 deletions

View File

@@ -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"
}
}