Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pffan91/0cede4f9c2fb6a3e91efa06667fda659 to your computer and use it in GitHub Desktop.
Save pffan91/0cede4f9c2fb6a3e91efa06667fda659 to your computer and use it in GitHub Desktop.
NetworkLayerWithMoya_customObject
// Created by Vladyslav Semenchenko on 15/05/2017.
// Copyright © 2017 Vladyslav Semenchenko. All rights reserved.
import Mapper
// 1:
class Camera: Mappable {
var cameraId: Int?
var title: String?
var isAvailable: Bool?
// 2:
required init(map: Mapper) throws {
try cameraId = map.from("cameraId")
try title = map.from("title")
try isAvailable = map.from("isAvailable")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment