Interface ITimetableClient
- Namespace
- DotBahn.Timetables
- Assembly
- DotBahn.Timetables.dll
Client for accessing the 'Deutsche Bahn Timetables'-API
public interface ITimetableClient
Methods
GetFullChangesAsync(int, Timetable?, CancellationToken)
Gets full changes for a specific station. If a Timetable is supplied, the changes are merged onto this instance
Task<Timetable> GetFullChangesAsync(int eva, Timetable? mergeOn = null, CancellationToken ct = default)
Parameters
evaintThe EVA station number
mergeOnTimetableCurrent timetable on which these changes should apply
ctCancellationTokenToken to cancel the request
Returns
Exceptions
- HttpRequestException
Thrown when non-success status codes occur
GetRecentChangesAsync(int, Timetable?, CancellationToken)
Gets recent changes for a specific station. If a Timetable is supplied, the changes are merged onto this instance
Task<Timetable> GetRecentChangesAsync(int eva, Timetable? mergeOn = null, CancellationToken ct = default)
Parameters
evaintThe EVA station number
mergeOnTimetableCurrent timetable on which these changes should apply
ctCancellationTokenToken to cancel the request
Returns
Exceptions
- HttpRequestException
Thrown when non-success status codes occur
GetTimetableAsync(int, DateTime, CancellationToken)
Gets the timetable for a specific station and time
Task<Timetable> GetTimetableAsync(int eva, DateTime dateTime, CancellationToken ct = default)
Parameters
evaintThe EVA station number
dateTimeDateTimeThe date and hour (only YYMMDD/HH are used)
ctCancellationTokenToken to cancel the request
Returns
Exceptions
- HttpRequestException
Thrown when non-success status codes occur