All Projects → modo-studio → DarkSkyKit

modo-studio / DarkSkyKit

Licence: MIT license
DarkSky.net API client written in Swift.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to DarkSkyKit

Jupiter
🌞 The Swift Weather Framework
Stars: ✭ 14 (-57.58%)
Mutual labels:  weather, darksky
PyWeather
Viewing the weather in a CLI has never been this much fun. (ARCHIVED)
Stars: ✭ 28 (-15.15%)
Mutual labels:  weather, weather-conditions
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 (+3.03%)
Mutual labels:  weather, darksky
darksky-influxdb
Logs weather information from darksky.io to InfluxDB
Stars: ✭ 22 (-33.33%)
Mutual labels:  weather, darksky
weatherBot
⛈ A Twitter bot for weather
Stars: ✭ 20 (-39.39%)
Mutual labels:  weather, darksky
aprs-weather-submit
Manually submit weather station information to the APRS-IS network.
Stars: ✭ 17 (-48.48%)
Mutual labels:  weather, weather-conditions
MMM-forecast-io
Forecast.io Module for MagicMirror
Stars: ✭ 58 (+75.76%)
Mutual labels:  weather, darksky
darksky
Forecast.io API wrapper in Go (Golang)
Stars: ✭ 74 (+124.24%)
Mutual labels:  weather, darksky
Tablet-desk-clock
Software for displaying a clock on a tablet.
Stars: ✭ 24 (-27.27%)
Mutual labels:  weather
weather
A privacy friendly weather app for Android with built in rain radar
Stars: ✭ 209 (+533.33%)
Mutual labels:  weather
File-Maker
Generate data files for Wii Channels that have the latest news, forecast data, etc.
Stars: ✭ 65 (+96.97%)
Mutual labels:  weather
paper-weather
☀️🌧 Material design weather element inspired by google weather
Stars: ✭ 14 (-57.58%)
Mutual labels:  weather
VWapi
⛈ ☀️ Visual Weather api. Returns beautiful pictures with the current weather.
Stars: ✭ 33 (+0%)
Mutual labels:  weather
grib-rs
GRIB format parser for Rust
Stars: ✭ 23 (-30.3%)
Mutual labels:  weather
wind-js-server
Service to expose Grib2 wind forecast data as JSON
Stars: ✭ 98 (+196.97%)
Mutual labels:  weather
gribr
GRIB interface for R using ECMWF ecCodes
Stars: ✭ 18 (-45.45%)
Mutual labels:  weather
TDDWeatherApp
Android App trying to apply TDD and using MVVM, Kotlin Coroutines
Stars: ✭ 38 (+15.15%)
Mutual labels:  weather
coolme
A 🌜⚽⚽👢 Discord bot, invite ➡
Stars: ✭ 13 (-60.61%)
Mutual labels:  weather
weather-mobile
A simple GTK4 weather app to play with rust and PinePhone development. I just needed a weather app that scaled properly...
Stars: ✭ 15 (-54.55%)
Mutual labels:  weather
wetterdienst
Open weather data for humans
Stars: ✭ 190 (+475.76%)
Mutual labels:  weather

DarkSkyKit: DarkSkyKit API Client in Swift

Build Status CocoaPods Compatible codecov

DarkSky.net API client written in Swift.

Usage

import DarkSkyKit

Init

Basic Configuration

Init the DarkSkyKit client using only the api token.

let forecastClient = DarkSkyKit(apiToken: "AAA")

Extended Configuration

Init the DarkSkyKit client using a custom configuration. Check out the darksky.net documentation to know more about these properties (units, exclude, extend & language).

let c = Configuration(token: "AAA", units: .si, exclude: .alerts, lang: "ES")
let forecastClient = DarkSkyKit(configuration: c)

Fetch

DarkSkt.net API provides 2 ways of fetch weather data: current and time machine.

Current

Fetch current weather conditions based on a given location.

forecastClient.current(latitude: 0.34565, longitude: 1.64559) { result in
  switch result {
    case .success(let forecast):
      // Manage weather data using the Forecast model. Ex:
      if let current = forecast.currently {
        let t = current.temperature
      }
    case .failure(let error):
      // Manage error case
  }
}

Time Machine

Fetch weather conditions based on a given date and location.

let d = NSDate(timeIntervalSinceNow: timestamp)
forecastClient.current(latitude: 0.34565, longitude: 1.64559, date: d) { result in
  // Manage result
}

Requirements

  • iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 7.3+

Installation

To install it, simply add the following line to your Podfile:

pod "DarkSkyKit"

About

This project is funded and maintained by Caramba. We 💛 open source software!

Check out our other open source projects, read our blog or say 👋 on twitter @carambalabs.

Contribute

Contributions are welcome 🤘 We encourage developers like you to help us improve the projects we've shared with the community. Please see the Contributing Guide and the Code of Conduct.

License

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

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].