All Projects → anverbogatov → OpenWeatherMapKit

anverbogatov / OpenWeatherMapKit

Licence: MIT license
🌦 OpenWeatherMapKit is a small and simple framework written in Swift that gives you access to all features of the OpenWeatherMap service's APIs right in your iOS / macOS / watchOS/ tvOS application. ☔️

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to OpenWeatherMapKit

epaper-clock-and-more
e-paper clock + weather + AQI + traffic delays - using Waveshare 2.7inch & 4.2inch eink displays running on Raspberry Pi
Stars: ✭ 34 (+78.95%)
Mutual labels:  openweathermap
weatherify
A weather app built with Svelte
Stars: ✭ 17 (-10.53%)
Mutual labels:  openweathermap
MMM-OpenmapWeather
This module loads current weather as images on Magic Mirror
Stars: ✭ 18 (-5.26%)
Mutual labels:  openweathermap
react-weather-app
Weather App built with React & TypeScript
Stars: ✭ 61 (+221.05%)
Mutual labels:  openweathermap
SciFi Conky HUD
SciFi theme for Conky
Stars: ✭ 33 (+73.68%)
Mutual labels:  openweathermap
pluvia weather flutter
A weather app with beautiful animations, built with Flutter. Uses the OpenWeatherMap API and MapBox API.
Stars: ✭ 114 (+500%)
Mutual labels:  openweathermap
OpenWeatherMap-Android-Library
A wrapper for the openweathermap REST API
Stars: ✭ 100 (+426.32%)
Mutual labels:  openweathermap
scala-weather
High-performance Scala library for looking up the weather
Stars: ✭ 45 (+136.84%)
Mutual labels:  openweathermap
acuparse
Captures, stores, and displays data from an AcuRite ‎Iris/Atlas weather station and towers via an Access/smartHUB. Uploads data to Weather Underground, CWOP, Weathercloud, PWS Weather, Windy, Windguru, and OpenWeatherMap. *** MIRROR REPO | See: https://gitlab.com/acuparse/acuparse ***
Stars: ✭ 57 (+200%)
Mutual labels:  openweathermap
react-weather-app
An attempt to make an ultimate weather app. In ReactJS, with React hooks and context.
Stars: ✭ 39 (+105.26%)
Mutual labels:  openweathermap
WallberryTheme
Bringing the WallberryTheme to MagicMirror²
Stars: ✭ 94 (+394.74%)
Mutual labels:  openweathermap
OWM-JAPIs
Java APIs for OpenWeatherMap.org
Stars: ✭ 14 (-26.32%)
Mutual labels:  openweathermap
weather
⛅️ Weather app for Nextcloud
Stars: ✭ 41 (+115.79%)
Mutual labels:  openweathermap
weather-bar-app
Weather Bar lives in your Menu Bar giving you access to beautiful real-time weather conditions and a generous 15-day forecast.
Stars: ✭ 38 (+100%)
Mutual labels:  openweathermap
angular-weather-app
Angular 7 web app displays the weather report through openweathermap.org APIs
Stars: ✭ 13 (-31.58%)
Mutual labels:  openweathermap
TheWeatherDashboardApp
A small and stylish weather dashboard.
Stars: ✭ 29 (+52.63%)
Mutual labels:  openweathermap
angular-openweather-app
A weather forecast app written in AngularJS
Stars: ✭ 54 (+184.21%)
Mutual labels:  openweathermap
android-weather
View a beautiful, material design-based 10 day weather forecast
Stars: ✭ 32 (+68.42%)
Mutual labels:  openweathermap
OpenWeather
Arduino library to fetch weather forecasts from OpenWeatherMap
Stars: ✭ 88 (+363.16%)
Mutual labels:  openweathermap
owmr
An R Interface to OpenWeatherMap
Stars: ✭ 24 (+26.32%)
Mutual labels:  openweathermap

Build Status codecov Badge w/ Version || Swift Badge w/ Platform

⚠️ Message from author: ⚠️

Guys thanks for your incredible support of that project. I see that it was useful for somebody and that makes me really happy.
Anyway, since last years I was mainly working as cloud-native applications developer and was using other technologies, I have no
plans to update this SDK at all.

So, feel free to fork it and make your own implementation of it. There is no need to create issues / requests here.

OpenWeatherMapKit

OpenWeatherMapKit is a small and simple framework written in Swift that gives you access to all features of the OpenWeatherMap service's APIs right in your iOS / macOS / watchOS/ tvOS application.

How to install:

🥥 Cocoapods

Just add following line to your Podfile:

pod 'OpenWeatherMapKit'

and run following command in your Terminal from project's root folder:

pod update

How to use:

Prerequisites

To normal working OpenWeatherMapKit must be initialized with your API token.

You can use following method to initialize OpenWeatherMapKit. Just replace [YOUR API TOKEN] by your own API token which can be retrieved from https://home.openweathermap.org/api_keys:

 OpenWeatherMapKit.initialize(withAppId: "[YOUR API TOKEN]")

Usage

Use OpenWeatherMapKit class to retrieve weather data. It is a singleton and access to it's instance can be done through instance variable.

🌇 Get weather by City

You can retrieve weather data for specific city by it's name:

OpenWeatherMapKit.instance.currentWeather(forCity: "Samara") { (forecast, error) in
    ...
}

or event by city name and country code:

OpenWeatherMapKit.instance.currentWeather(forCity: "Samara", withCountryCode: "ru") { (forecast, error) in
    ...
}
🌍 Get weather by geo coordinates

You can retrieve weather data for specific geo location by it's coordinates:

OpenWeatherMapKit.instance.currentWeather(forCoordiante: (latitude: 53.2610313, longitude: 50.0579958)) { (forecast, error) in
    ...
}
📆 Get weather forecast for next 5 days

You can retrieve weather data for next five days for specific city by it's name and country code:

OpenWeatherMapKit.instance.weatherForecastForFiveDays(forCity: "Samara", withCountryCode: "ru") { (forecast, error) in
...
}

or for specific geo location by it's coordinates:

OpenWeatherMapKit.instance.weatherForecastForFiveDays(forCoordiante: (latitude: 53.2610313, longitude: 50.0579958)) { (forecast, error) in
...
}
🌤 WeatherItem

All operations for getting current weather data return special object of WeatherItem type. WeatherItem is a simple struct that contains temperature data on the board. Here are fields you can access on it:

/// Weather item's temperature values in Kelvin
public let kelvin: (currentTemp: Double, maxTemp: Double, minTemp: Double)
/// Weather item's temperature values in Celsius
public let celsius: (currentTemp: Double, maxTemp: Double, minTemp: Double)
/// Weather item's temperature values in Fahrenheit
public let fahrenheit: (currentTemp: Double, maxTemp: Double, minTemp: Double)

For example, if you want to get information on current weather in celsius you achieve that using following statement:

weatherItem.celsius.currentTemp

WeatherItem can be accessed from instances of ForecastItem. Here is example:

forecast.main.celsius.currentTemp

🛣 Roadmap

Please find project's roadmap below:

Version ETA Feature
v0.1   January 2018 Current weather forecast by city & geo coordinates + support of different units (Celsius, Kelvin, Fahrenheit)
v0.2 April 2018 Weather forecast for 5 days / 3 hour by city & geo coordinates.
v0.3 ??? 16 day daily forecast by city & geo coordinates.

⚠️ Support of other platforms (like watchOS, macOS & tvOS) will be introduced later

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].