Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deutsche_bahn_api/timetable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def get_timetable_xml(self, hour: Optional[int] = None, date: Optional[datetime]
.format(response.status_code, response.text))
return response.text

def get_timetable(self, hour: Optional[int] = None) -> list[Train]:
def get_timetable(self, hour: Optional[int] = None, date: Optional[datetime] = None) -> list[Train]:
train_list: list[Train] = []
trains = elementTree.fromstringlist(self.get_timetable_xml(hour))
trains = elementTree.fromstringlist(self.get_timetable_xml(hour, date))
for train in trains:
trip_label_object: dict[str, str] | None = None
arrival_object: dict[str, str] | None = None
Expand Down