diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-11-10 17:50:31 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-11-10 17:50:31 +0100 |
commit | 2f7bdf99e8b28f13bf44553b22b274f10627fa93 (patch) | |
tree | 6050fd3c82512a08c7b47ca811027d2931d1cf9f /lib/Travelynx/Helper | |
parent | fa94447f10cd98081c06a9dde5245fe3ece93e21 (diff) |
Traewelling: Use API v1 for checkin as well
Diffstat (limited to 'lib/Travelynx/Helper')
-rw-r--r-- | lib/Travelynx/Helper/Traewelling.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Travelynx/Helper/Traewelling.pm b/lib/Travelynx/Helper/Traewelling.pm index b713922..8794b6e 100644 --- a/lib/Travelynx/Helper/Traewelling.pm +++ b/lib/Travelynx/Helper/Traewelling.pm @@ -340,7 +340,7 @@ sub checkin { } my $request = { - tripID => $opt{trip_id}, + tripId => $opt{trip_id}, lineName => $opt{train_type} . ' ' . ( $opt{train_line} // $opt{train_no} ), start => q{} . $opt{dep_eva}, @@ -355,12 +355,13 @@ sub checkin { $request->{body} = $opt{user_data}{comment}; } +# https://github.com/Traewelling/traewelling/blob/develop/app/Http/Controllers/API/v1/TransportController.php -> create. trains/checkin ist richtig. my $debug_prefix - = "v0/trains/checkin('$request->{lineName}' $request->{tripID} $request->{start} -> $request->{destination})"; + = "v1/trains/checkin('$request->{lineName}' $request->{tripId} $request->{start} -> $request->{destination})"; $self->{user_agent}->request_timeout(20) ->post_p( - "https://traewelling.de/api/v0/trains/checkin" => $header => json => + "https://traewelling.de/api/v1/trains/checkin" => $header => json => $request )->then( sub { my ($tx) = @_; |