A Swift client for accessing the weather via forecast.io's API
Clone or download
Latest commit b5022d3 Oct 23, 2017

README.md

ForecastIOClient

CI Status Version License Platform

A Swift forecast.io API client.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Requires iOS 8+

Installation

CocoaPods

ForecastIOClient is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ForecastIOClient"

Configuration

Import ForecastIOClient and add the following line to your func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool method:

ForecastIOClient.apiKey = "FORECAST-IO-API-KEY"

Sample Usage

ForecastIOClient.sharedInstance.forecast(-75.6046300, longitude: -26.2090000) { (forecast, forecastAPICalls) -> Void in
  // do something with forecast data
}

Author

Peter Willsey, pwillsey@gmail.com

License

ForecastIOClient is available under the MIT license. See the LICENSE file for more info.