summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/MM.pm
blob: dcdcae4a9103aaacb219a59a21be5d8d2633ed95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package Travel::Status::DE::MM;

use strict;
use warnings;
use 5.010;

no if $] >= 5.018, warnings => 'experimental::smartmatch';

our $VERSION = '2.01';

use parent 'Travel::Status::DE::URA';

sub new {
	my ( $class, %opt ) = @_;

	$opt{ura_base}    = 'http://ura.itcs.mvg-mainz.de/interfaces/ura';
	$opt{ura_version} = '1';

	return $class->SUPER::new(%opt);
}

1;

__END__

=head1 NAME

Travel::Status::DE::MM - unofficial Mainzer Mobilit├Ąt departure monitor.

=head1 SYNOPSIS

    use Travel::Status::DE::MM;

    my $status = Travel::Status::DE::MM->new(
        stop => 'Hauptbahnhof West'
    );

    for my $d ($status->results) {
        printf(
            "%s  %-5s %25s (in %d min)\n",
            $d->time, $d->line, $d->destination, $d->countdown
        );
    }

=head1 VERSION

version 2.01

=head1 DESCRIPTION

Travel::Status::DE::MM is an unofficial interface to the Mainzer
Mobilit├Ąt realtime departure monitor.

=head1 METHODS

=over

=item my $status = Travel::Status::DE::MM->new(I<%opt>)

Requests the departures as specified by I<opts> and returns a new
Travel::Status::DE::MM object.

Calls Travel::Status::DE::URA->new with the appropriate B<ura_base> and
B<ura_version> parameters. All I<opts> are passed on.

See Travel::Status::DE::URA(3pm) for the other methods.

=back

=head1 DIAGNOSTICS

None.

=head1 DEPENDENCIES

=over

=item * Travel::Status::DE::URA(3pm)

=back

=head1 BUGS AND LIMITATIONS

Many.

=head1 SEE ALSO

MM-m(1), Travel::Status::DE::URA(3pm).

=head1 AUTHOR

Copyright (C) 2016, 2019 by Moritz Schlarb E<lt>moschlar@metalabs.deE<gt>

=head1 LICENSE

This module is licensed under the same terms as Perl itself.