TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Apr 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Ulaş Sancak.
Depends on: | |
Alamofire | ~> 4.4 |
ObjectMapper | ~> 2.2 |
To run the example project, clone the repo, and run pod install
from the Example directory first.
openweathermap-swift-sdk is available through CocoaPods. To install it, simply add the following line to your 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 is available under the MIT license. See the LICENSE file for more info.