NAME
DarkSky::API - Provides Perl API to DarkSky
SYNOPSIS
use 5.016; use DarkSky::API; use Data::Dumper;
my $lat = 43.6667; my $long = -79.4167; my $time = "1475363709"; # example epoch time (optional) my $key = "c9ce1c59d139c3dc62961cbd63097d13"; # example DarkSky API key
my $forecast = DarkSky::API->new( key => $key, longitude => $long, latitude => $lat, time => $time );
say "current temperature: " . $forecast->{currently}->{temperature};
my @daily_data_points = @{ $forecast->{daily}->{data} };
# Use this data to prove/disprove climate change, # or how to understand its impact. # In the meantime, inspect it by dumping it. for (@daily_data_points) { print Dumper($_); }
DESCRIPTION
This module is a wrapper around the DarkSky API.
REFERENCES
Git repository: https://github.com/mlbright/DarkSky-API
DarkSky API docs: https://darksky.net/dev/
Another Perl API to DarkSky: http://search.cpan.org/~mallen/WebService-ForecastIO-0.01
COPYRIGHT
Copyright (c) 2013 "Martin-Louis Bright"
LICENSE
This library is free software and may be distributed under the same terms as perl itself. See http://dev.perl.org/licenses/.