Gemo 0.1.8

Gemo 0.1.8

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最新版本2017年11月
SwiftSwift 版本echo “4.0” >> .swift-version
SPM支持 SPM

gamal al3yak 维护。



Gemo 0.1.8

  • 作者
  • Gamal





示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

要求

swift 4
xcode 9

用法

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        Gemo.request(link: "https://quarkbackend.com/getfile/gemgemo/mony", method: .get)
            .response(Money.self) { (result) in
                switch (result) {
                    case .failure(let error):
                        print(error)

                    case .jsonString(let jsonString):
                        print(jsonString)

                    case .success(let object):
                        print("object:", object)
                }
            }

    }
}



struct Money: Codable {

    let isMyMoney: Bool

    private enum CodingKeys: String, CodingKey {
        case isMyMoney = "taked"
    }

}

安装

Gemo 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
作者

pod 'Gemo'

Gamal, [email protected]

更多信息请参阅 LICENSE 文件。

许可证

Gemo 在 MIT 许可证下提供。更多信息请参阅 LICENSE 文件。