diff LazyBear/Views/Profile/Networking/ProfileResponse.swift @ 374:d402bfa367c2

Implementing ProfileView
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 17 Apr 2021 00:01:59 +0200
parents
children f3cb5bdea8e5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Views/Profile/Networking/ProfileResponse.swift	Sat Apr 17 00:01:59 2021 +0200
@@ -0,0 +1,27 @@
+//
+//  ProfileResponse.swift
+//  LazyBear
+//
+//  Created by Dennis Concepción Martín on 16/4/21.
+//
+
+import SwiftUI
+
+struct ProfileResponse: Codable {
+    var intradayPrices: [String: NestedIntradayPricesModel]?  // String is each company symbol
+    var quotes: [String: NestedQuoteModel]?  // String is each company symbol
+    
+    private enum CodingKeys : String, CodingKey {
+        case intradayPrices = "intraday_prices"
+        case quotes
+    }
+}
+
+
+struct NestedQuoteModel: Codable {
+    var nestedQuoteModel: QuoteModel
+    
+    private enum CodingKeys : String, CodingKey {
+        case nestedQuoteModel = "quote"
+    }
+}