comparison LazyBear/Views/Home/Networking/HomeResponse.swift @ 346:80bfa88c6b0f

Implementing Prop API
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sun, 11 Apr 2021 19:55:47 +0200
parents
children 5ccceb527178
comparison
equal deleted inserted replaced
345:fde2b30c719e 346:80bfa88c6b0f
1 //
2 // HomeResponse.swift
3 // LazyBear
4 //
5 // Created by Dennis Concepción Martín on 11/4/21.
6 //
7
8 import SwiftUI
9
10 struct HomeResponse: Codable {
11 var lists: [String: [QuoteModel]]? // String is the list type; gainers, losers ...
12 var sectorPerformance: [SectorPerformanceModel]?
13 var tradingDates: [TradingDatesModel]?
14 var intradayPrices: [String: NestedIntradayPricesModel]? // String is each company symbol
15
16 private enum CodingKeys : String, CodingKey {
17 case lists
18 case sectorPerformance = "sector_performance"
19 case tradingDates = "trading_dates"
20 case intradayPrices = "intraday_prices"
21 }
22 }
23
24
25 struct NestedIntradayPricesModel: Codable {
26 var nestedIntradayPrices: [IntradayPricesModel]
27
28 private enum CodingKeys : String, CodingKey {
29 case nestedIntradayPrices = "intradayprices"
30 }
31 }