-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from gionoa/develop
Driver Info
- Loading branch information
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// DriverInfo.swift | ||
// | ||
// | ||
// Created by Giovanni Noa on 6/12/20. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct Drivers: Codable { | ||
let data: DriversData | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case data = "MRData" | ||
} | ||
} | ||
|
||
struct DriversData: Codable { | ||
let series: String | ||
let url: String | ||
let limit: String | ||
let offset: String | ||
let total: String | ||
let driverTable: DriverTable | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case series | ||
case url | ||
case limit | ||
case offset | ||
case total | ||
case driverTable = "DriverTable" | ||
} | ||
} | ||
|
||
struct DriverTable: Codable { | ||
let season: String | ||
let drivers: [Driver] | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case season | ||
case drivers = "Drivers" | ||
} | ||
} |