comparison LazyBear/Views/Company/Networking/Company.swift @ 414:b93172662988

Implement networking KeyStats
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 09 Jun 2021 10:57:25 +0200
parents c804ce7a1560
children 34f9e408b861
comparison
equal deleted inserted replaced
413:2984d8946342 414:b93172662988
20 if view == "chart" { 20 if view == "chart" {
21 bazooka.request(url: url, model: ChartResponse.self) { response in 21 bazooka.request(url: url, model: ChartResponse.self) { response in
22 switch requestType { 22 switch requestType {
23 case .initial: 23 case .initial:
24 self.chartData = response 24 self.chartData = response
25 print(response)
25 case .refresh: 26 case .refresh:
26 self.chartData.historicalPrices = response.historicalPrices 27 self.chartData.historicalPrices = response.historicalPrices
27 case .streaming: 28 case .streaming:
28 self.chartData.quote = response.quote 29 self.chartData.quote = response.quote
29 } 30 }