The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenGbg::Service::Bridge - Data on the openness of Göta älvbron

SYNOPSIS

    my $bridge = OpenGbg->new->bridge;
    my $response = $bridge->get_is_currently_open;

    print $response->is_open ? 'It is open' : 'It is closed';

DESCRIPTION

The Göta älvbron is a major bascule bridge in Gothenburg that opens more or less daily. This service publishes two methods with regards to its status.

Official documentation

See OpenGbg for general information.

METHODS

get_is_currently_open

This method is for checking if the bridge is currently open.

Returns a GetIsCurrentlyOpen object.

get_opened_status($startdate, $enddate)

This method is for checking when it was opened in the past.

$startdate and $enddate are mandatory filtering arguments, both are expected to be in the iso-8601 representation: yyyy-mm-dd. The ending date is not inclusive.

Returns a GetOpenedStatus object.

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.