Skip to content

Instantly share code, notes, and snippets.

@Ravi61
Last active July 12, 2017 17:33
Show Gist options
  • Select an option

  • Save Ravi61/2f78b6884c6069f909dc6552271ca243 to your computer and use it in GitHub Desktop.

Select an option

Save Ravi61/2f78b6884c6069f909dc6552271ca243 to your computer and use it in GitHub Desktop.
BattleShip model without URL and Date usage
struct BattleShip: Codable {
var name: String
var model: String
var manufacturer: String
var hyperdriveRating: Double
var starshipClass: String
var created: String
var url: String
enum CodingKeys: String, CodingKey {
case name
case model
case manufacturer
case hyperdriveRating = "hyperdrive_rating"
case starshipClass = "starship_class"
case created
case url
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment