k);
use DateTime;
use DateTime::Format::Strptime;
use Encode qw(encode);
use IO::Socket::SSL;
use JSON;
use Travel::Status::DE::EFA::Departure;
use Travel::Status::DE::EFA::Info;
use Travel::Status::D
ub {
my ($content) = @_;
$self->{response} = $self->{json}->decode($content);
if ( $self->{developer_mode} ) {
say $self->{json}->pretty->encode( $self->{response} );
}
$self->che
not( $opt{coord}
or $opt{name}
or $opt{stopfinder}
or $opt{stopseq}
or $opt{from_json} )
)
{
confess('You must specify a name');
}
if ( $opt{type}
and not( $opt{type} =~ m{
) = @_;
my $json = $opt{json};
my $ref = {
param => {},
link_url => $json->{infoLinkURL},
link_text => $json->{infoLinkText},
subject => $json->{infoText}{s
ontent => $json->{infoText}{content},
subtitle => $json->{infoText}{subtitle},
additional_text => $json->{infoText}{additionalText},
};
for my $param ( @{ $json->{paramList} // [
{
$ref->{param}{ $param->{name} } = $param->{value};
}
return bless( $ref, $obj );
}
sub TO_JSON {
my ($self) = @_;
return { %{$self} };
}
1;
__END__
=head1 NAME
Travel::Status::DE::EFA::
$ref->{delay} = $ref->{dep_delay} // $ref->{arr_delay};
return bless( $ref, $obj );
}
sub TO_JSON {
my ($self) = @_;
my $ret = { %{$self} };
for my $k (qw(sched_arr rt_arr arr sched_dep rt_d
DE::EFA::Stop object. You should not need to
call this.
=item $stop->TO_JSON
Allows the object data to be serialized to JSON.
=back
=head1 DIAGNOSTICS
None.
=head1 DEPENDENCIES
=over
=item Cl
sub mot_name {
my ($self) = @_;
return $mot_mapping[ $self->{mot} ] // 'sonstige';
}
sub TO_JSON {
my ($self) = @_;
return { %{$self} };
}
1;
__END__
=head1 NAME
Travel::Status::DE::EFA::
DE::EFA::Line object. You should not need to
call this.
=item $line->TO_JSON
Allows the object data to be serialized to JSON.
=back
=head1 DIAGNOSTICS
None.
=head1 DEPENDENCIES
=over
=item Cl
) = @_;
my $json = $conf{json}{transportation} // $conf{json}{leg}{transportation};
#say $json->{disassembledName} . ' <-> ' . $json->{number};
my $ref = {
operator => $json->{operator}{n
$json->{product}{name},
product_class => $json->{product}{class},
polyline_raw => $conf{json}{leg}{coords},
name => $json->{name},
line => $json->{disassembledName} // $json
$json->{properties}{trainNumber},
type => $json->{properties}{trainType} // $json->{product}{name},
id => $json->{id},
dest_name => $json->{destination}{name},
dest_id => $json-
{
my ( $self, $departure ) = @_;
}
sub new {
my ( $obj, %conf ) = @_;
my $departure = $conf{json};
my ( $sched_dt, $real_dt );
if ( my $dt = $departure->{dateTime} ) {
$sched_dt = DateTime-
top->name )
{
next;
}
push( @via_show, $stop );
}
}
return @via_show;
}
sub TO_JSON {
my ($self) = @_;
# compute on-demand keys
$self->id;
my $ret = { %{$self} };
delete $re
eparture object. You should not need to
call this.
=item $departure->TO_JSON
Allows the object data to be serialized to JSON.
=back
=head1 DEPARTURE TYPES
The following are known so far:
=over
stop ) {
# next;
# }
push( @via_show, $stop );
}
}
return @via_show;
}
sub TO_JSON {
my ($self) = @_;
return { %{$self} };
}
1;
__END__
=head1 NAME
Travel::Status::DE::EFA::
::Result object. You should not need to
call this.
=item $departure->TO_JSON
Allows the object data to be serialized to JSON.
=back
=head1 DEPARTURE TYPES
The following are known so far:
=over