Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 230536c May 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Weather.xcodeproj Version 1.0.1 May 10, 2019
Weather Version 1.0.1 May 10, 2019
WeatherTests Initial commit May 6, 2019
.gitignore Initial commit May 6, 2019
README.md Fix typo in README May 6, 2019

README.md

Weather

Basic Swift (iOS) client for Open Weather Map

How to use?

Manual integration

  1. Download latest release
  2. Unarchive and drag and drop Weather.framework Xcode's "Linked Frameworks and Libraries" section

Usage

  1. Use import Weather
  2. Initialize WeatherClient with you Open Weather Map API Key :
let weatherClient = WeatherClient(key: "YOUR_API_KEY")
  1. Use the provided methods to request the API

Documentation

func citiesSuggestions(for partialName: String) -> [City]

Returns an array of City matching the provided name

func weather(for city: City, completion: @escaping (Forecast?) -> Void)

Asynchronously query the current weather informations for the provided City. Completion provides a Forecast or nil.

func forceast(for city: City, completion: @escaping ([Forecast]?) -> Void)

Asynchronously query a 5-day weather forecast for the provided City. Completion provides a Forecast array or nil.

You can’t perform that action at this time.