Swiftpack.co -  jareksedy/WAWeather as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
jareksedy/WAWeather
WAWeather fetches weather data from WeatherAPI.com. You need to have an API key to use this package. You can freely sign up and receive an API key at WeatherAPI.com.
.package(url: "https://github.com/jareksedy/WAWeather.git", from: "2.0.2")

WAWeather

WAWeather (WeatherApi.com Weather) fetches weather data from WeatherAPI.com. You need to have an API key to use this package. You can sign up and get an API key at WeatherAPI.com for free.

Usage

WAWeather needs an API key, latitude and longitude coordinates of a location, number of days for a forecast (default is one). When currentOnly is set to true WAWeather fetches only current weather conditions for a given location.

let weather = try WAWeather(apiKey: "[insert_your_api_key_here]", coordinates: (lat: 43.23, lon: 76.95), days: 3, currentOnly: false)
print(weather.data)

Detailed description of data model is available at WeatherAPI.com. See https://www.weatherapi.com/docs/ for reference.

Installation

  • Add .package(url: "https://github.com/jareksedy/WAWeather.git", from: "1.0.0") to your Package.swift file's dependencies.
  • Update your packages using $ swift package update.

Contact me

Contact me at jareksedy@icloud.com

GitHub

link
Stars: 0
Last commit: 2 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API