You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// // BaseApi.swift // GMERemittance // // Created by gme_2 on 22/08/2018. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation
protocol ApiServiceType { var auth: RestApiMananger {get} var baseUrl: String {get} }
extension ApiServiceType { var auth: RestApiMananger {return RestApiMananger.sharedInstance} var baseUrl: String {return UrlManager.sharedInstance.baseURL} }
// repeated things in api // //if (response.errorCode ?? "") == "1" { // let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) // failure(error) //}else { // let model = response.data // success(model) //}
//class UserContainer: Mappable { // var errorCode: String? // var message: String? // var id: String? // var data: User? // // required init?(map: Map) { // // } // // func mapping(map: Map) { // errorCode <- map["ErrorCode"] // message <- map["Msg"] // id <- map["Id"] // data <- map["Data"] // } //}
|