-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGEOCity.swift
More file actions
53 lines (45 loc) · 1.2 KB
/
GEOCity.swift
File metadata and controls
53 lines (45 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// GEOCity.swift
// RKGeonames
//
// Created by Stefan Buretea on 1/18/17.
// Copyright © 2017 Stefan Burettea. All rights reserved.
//
import Foundation
import ObjectMapper
struct GEOCity: Mappable {
var fcodeName: String?
var toponymName: String?
var countrycode: String?
var fcl: String?
var fclName: String?
var name: String?
var wikipedia: String?
var lng: Double?
var fcode: String?
var geonameId: String?
var lat: Double?
var population: String?
init?(map: Map) { }
mutating func mapping(map: Map) {
fcodeName <- map["fcodeName"]
toponymName <- map["toponymName"]
countrycode <- map["countrycode"]
fcl <- map["fcl"]
fclName <- map["fclName"]
name <- map["name"]
wikipedia <- map["wikipedia"]
lng <- map["lng"]
fcode <- map["fcode"]
geonameId <- map["geonameId"]
lat <- map["lat"]
population <- map["population"]
}
}
struct GEOCityHTTPResponse: Mappable {
var geonames: [GEOCity]?
init?(map: Map) {}
mutating func mapping(map: Map) {
geonames <- map["geonames"]
}
}