comparison LazyBear/Views/Profile/Networking/ProfileResponse.swift @ 375:f3cb5bdea8e5

Update Codable requests in HomeView
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 21 Apr 2021 16:19:50 +0200
parents d402bfa367c2
children d01859776fe6
comparison
equal deleted inserted replaced
374:d402bfa367c2 375:f3cb5bdea8e5
5 // Created by Dennis Concepción Martín on 16/4/21. 5 // Created by Dennis Concepción Martín on 16/4/21.
6 // 6 //
7 7
8 import SwiftUI 8 import SwiftUI
9 9
10 struct ProfileResponse: Codable { 10 //struct ProfileResponse: Codable {
11 var intradayPrices: [String: NestedIntradayPricesModel]? // String is each company symbol 11 // var intradayPrices: [String: NestedIntradayPricesModel]? // String is each company symbol
12 var quotes: [String: NestedQuoteModel]? // String is each company symbol 12 // var quotes: [String: NestedQuoteModel]? // String is each company symbol
13 13 //
14 private enum CodingKeys : String, CodingKey { 14 // private enum CodingKeys : String, CodingKey {
15 case intradayPrices = "intraday_prices" 15 // case intradayPrices = "intraday_prices"
16 case quotes 16 // case quotes
17 } 17 // }
18 } 18 //}
19 19 //
20 20 //
21 struct NestedQuoteModel: Codable { 21 //struct NestedQuoteModel: Codable {
22 var nestedQuoteModel: QuoteModel 22 // var nestedQuoteModel: QuoteModel
23 23 //
24 private enum CodingKeys : String, CodingKey { 24 // private enum CodingKeys : String, CodingKey {
25 case nestedQuoteModel = "quote" 25 // case nestedQuoteModel = "quote"
26 } 26 // }
27 } 27 //}