测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | 2017年4月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Ulaş Sancak 维护。
依赖关系 | |
Alamofire | ~> 4.4 |
ObjectMapper | ~> 2.2 |
要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install
。
openweathermap-swift-sdk 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:
pod "openweathermap-swift-sdk"
import openweathermap_swift_sdk
OpenWeatherMapClient.client(appID: "app_id")
import openweathermap_swift_sdk
OpenWeatherMapAPIClient.client.getWeather(cityName: "istanbul") { (weatherData, error) in
if error == nil && weatherData!.code == "200" {
//Data received
}
}
import openweathermap_swift_sdk
OpenWeatherMapAPIClient.client.getWeather(cityIDs: [524901, 703448, 2643743], limit: 0) { (result, error) in
if error == nil && result!.code == "200" {
//Data received
}
}
import openweathermap_swift_sdk
OpenWeatherMapAPIClient.client.getForecast(cityName: "istanbul", countryCode: "tr", limit: 0) { (result, error) in
if error == nil && result!.code == "200" {
//Data received
}
}
import openweathermap_swift_sdk
OpenWeatherMapAPIClient.client.getDailyForecast(cityName: "istanbul", countryCode: "tr", limit: 0) { (result, error) in
if error == nil && result!.code == "200" {
//Data received
}
}
Ulaş Sancak, [email protected]
openweathermap-swift-sdk 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。