NAME

OpenGbg::Service::StyrOchStall - Entry point to the StyrOchStall bike rental service

VERSION

Version 0.1404, released 2018-05-19.

SYNOPSIS

    my $service = OpenGbg->new->styr_och_stall;
    my $stations = $service->get_bike_stations;

    print $stations->get_by_index(0)->to_text;

STATUS

Deprecated. The underlying web service has changed. Nothing under the OpenGbg::StyrOchStall namespace works, and will be replaced.

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.

Official documentation

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

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.

SOURCE

https://github.com/Csson/p5-OpenGbg

HOMEPAGE

https://metacpan.org/release/OpenGbg

AUTHOR

Erik Carlsson <info@code301.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Erik Carlsson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.