Last active
March 20, 2022 14:03
-
-
Save metin-atalay/dd1d3b07e79d006479490d9f385c71e0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
import ObjectMapper | |
struct WeatherModel : Mappable { | |
var coord : Coord? | |
var weather : [Weather]? | |
var base : String? | |
var main : Main? | |
var visibility : Int? | |
var wind : Wind? | |
var clouds : Clouds? | |
var dt : Int? | |
var sys : Sys? | |
var timezone : Int? | |
var id : Int? | |
var name : String? | |
var cod : Int? | |
init?(map: Map) { | |
} | |
mutating func mapping(map: Map) { | |
coord <- map["coord"] | |
weather <- map["weather"] | |
base <- map["base"] | |
main <- map["main"] | |
visibility <- map["visibility"] | |
wind <- map["wind"] | |
clouds <- map["clouds"] | |
dt <- map["dt"] | |
sys <- map["sys"] | |
timezone <- map["timezone"] | |
id <- map["id"] | |
name <- map["name"] | |
cod <- map["cod"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment