NAME
OpenGbg::Service::StyrOchStall - Data on rent-a-bike stations
SYNOPSIS
my $styr_och_stall = OpenGbg->new->styr_och_stall;
my $service = $styr_och_stall->get_bike_stations;
print $service->stations->get_by_index(0)->to_text;
DESCRIPTION
Styr och ställ is Gothenburg's bike share program. This service has a couple of methods to get data about the bike stations.
See OpenGbg for general information.
METHODS
get_bike_station($id)
$id
is the station id for the station you want to get information about. You'll need to first have fetched the stations with get_bike_stations to get the id's.
Returns a GetBikeStation object.
get_bike_stations(%geography)
%geography
is an optional hash used to limit returned stations to a geographical area. Its keys are lat
and long
, and optionally radius
(in metres).
If %geography
is absent no geographic filtering is done.
Returns a GetBikeStations object.
EXCEPTIONS
If the http call to the web service fails, a BadResponseFromService exception is thrown. Use Try::Tiny to catch.
AUTHOR
Erik Carlsson <info@code301.com>
COPYRIGHT
Copyright 2014 - Erik Carlsson
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.