NAME

OpenGbg::Handler - The entry point to all OpenGbg services.

SYNOPSIS

# $handler is a OpenGbg::Handler object
my $handler = OpenGbg->new(key => 'secret-api-key');

$response = $handler->styr_och_stall->get_bike_stations;

DESCRIPTION

OpenGbg::Handler is the class from where calls to all web services are made.

METHOD

styr_och_stall()

Returns a OpenGbg::Service::StyrOchStall object.

AUTHENTICATE

Once you have your api key you can use it in two different ways:

1. You can give it in the constructor:

my $opengbg = OpenGbg->new(key => 'secret-api-key');

2. You can save it in a file named .opengbg.ini in your homedir:

[API]
key = secret-api-key

SERVICES

The following services are currently implemented in this distribution:

StyrOchStall - Data on rent-a-bike stations

NAMING

All names related to the services are de-camelized. For example, the service 'GetBikeStations' is called like this:

my $gbg = OpenGbg->new;
my $stations = $gbg->get_bike_stations;

BUGS & ISSUES

The repository and issue tracker is at: https://github.com/Csson/p5-OpenGbg

DISCLAIMER

This is not an official distribution.

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.