Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r-icarus/forecast_io
Simple wrapper for Forecast.IO API
https://github.com/r-icarus/forecast_io
Last synced: 7 days ago
JSON representation
Simple wrapper for Forecast.IO API
- Host: GitHub
- URL: https://github.com/r-icarus/forecast_io
- Owner: r-icarus
- Created: 2014-10-04T01:37:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-27T23:35:51.000Z (over 7 years ago)
- Last Synced: 2024-10-04T07:18:55.980Z (about 1 month ago)
- Language: Elixir
- Homepage:
- Size: 13.7 KB
- Stars: 8
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Simple wrapper for Forecast.IO API. (Third Party APIs)
- fucking-awesome-elixir - forecast_io - Simple wrapper for Forecast.IO API. (Third Party APIs)
- awesome-elixir - forecast_io - Simple wrapper for Forecast.IO API. (Third Party APIs)
README
ForecastIO
==========Simple wrapper for Forecast.IO
## Usage
```bash
export FORECAST_IO_KEY=yourkey
```##Include forecast_io
```elixir
defp deps do
[
{:forecast_io, "~> 0.2.2"},
]
end
```#Start and use
```elixir
ForecastIO.start()
{:ok, result } = ForecastIO.forecast("28.6353","-106.0889")
current = ForecastIO.current(result)
```#Use ForecastIO Time API
```elixir
{mega, secs, _ } = :os.timestamp
now = mega * 1000000 + secs
ForecastIO.start()
{:ok, result } = ForecastIO.forecast_time("28.6353","-106.0889", now)
current = ForecastIO.current(result)
```