CoinSwitchAPI
- 支持 Dynamic API 的所有端点
- 通过 Codable 透明解码响应对象
- 基于 Swift 5 Result 枚举
示例
import CoinSwitch
let client = CoinSwitch.API(key: "{YOUR_API_KEY}", ip: "{YOUR_API_SECRET}")
client.getCoins().perform { result in
do {
let coins = try? result.get()
// use successfull response
} catch {
// handle request error
}
}
安装
CoinSwitchAPI 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod 'CoinSwitchAPI'
许可
CoinSwitchAPI 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。