Weather-WeatherKit
view release on metacpan or search on metacpan
Weather::WeatherKit - Apple WeatherKit REST API client
=head1 SYNOPSIS
use Weather::WeatherKit;
my $wk = Weather::WeatherKit->new(
team_id => $apple_team_id, # Apple Developer Team Id
service_id => $weatherkit_service_id, # WeatherKit Service Id
key_id => $key_id, # WeatherKit developer key ID
key => $private_key # Encrypted private key (PEM)
);
# Request current weather:
my $report = $wk->get(
lat => $lat, # Latitude
lon => $lon, # Longitude
dataSets => 'currentWeather'
);
# Request forecast for 8 days, use Weather::API::Base helper functions
requires some extra functionality, feel free to contact the author about it.
=head1 CONSTRUCTOR
=head2 C<new>
my $wk = Weather::WeatherKit->new(
team_id => "MLU84X58U4",
service_id => "com.domain.myweatherapp",
key_id => $key_id,
key => $private_key?,
key_file => $private_key_pem?,
language => $lang_code?,
timeout => $timeout_sec?,
expiration => $expire_secs?,
ua => $lwp_ua?,
curl => $use_curl?
);
Required parameters:
=over 4
lib/Weather/WeatherKit.pm view on Meta::CPAN
our $VERSION = '0.12';
=head1 SYNOPSIS
use Weather::WeatherKit;
my $wk = Weather::WeatherKit->new(
team_id => $apple_team_id, # Apple Developer Team Id
service_id => $weatherkit_service_id, # WeatherKit Service Id
key_id => $key_id, # WeatherKit developer key ID
key => $private_key # Encrypted private key (PEM)
);
# Request current weather:
my $report = $wk->get(
lat => $lat, # Latitude
lon => $lon, # Longitude
dataSets => 'currentWeather'
);
# Request forecast for 8 days, use Weather::API::Base helper functions
lib/Weather/WeatherKit.pm view on Meta::CPAN
requires some extra functionality, feel free to contact the author about it.
=head1 CONSTRUCTOR
=head2 C<new>
my $wk = Weather::WeatherKit->new(
team_id => "MLU84X58U4",
service_id => "com.domain.myweatherapp",
key_id => $key_id,
key => $private_key?,
key_file => $private_key_pem?,
language => $lang_code?,
timeout => $timeout_sec?,
expiration => $expire_secs?,
ua => $lwp_ua?,
curl => $use_curl?
);
Required parameters:
=over 4
( run in 0.240 second using v1.01-cache-2.11-cpan-4d50c553e7e )