Mercurial > public > lazybear
view LazyBear/Views/Home/Networking/HomeModels.swift @ 337:31f2838b2de7
Improving API requests with DispatchGroup
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Thu, 01 Apr 2021 16:34:45 +0200 |
parents | |
children |
line wrap: on
line source
// // SectorPerformanceModel.swift // LazyBear // // Created by Dennis Concepción Martín on 30/3/21. // import SwiftUI struct SectorPerformanceModel: Codable, Hashable { var name: String var performance: Double var lastUpdated: Int } struct CompanyRowModel: Codable, Hashable { var symbol: String var companyName: String var latestPrice: Double var changePercent: Double } // Model prepared with batch struct IntradayPricesArray: Codable { var intradayPrices: [IntradayPricesModel] // Change key name private enum CodingKeys : String, CodingKey { case intradayPrices = "intraday-prices" } } struct IntradayPricesModel: Codable { var open: Double? } struct TradingDatesModel: Codable { var date: String }