From 9da83c878efd0c6ebb3e12ede31ce09843360fad Mon Sep 17 00:00:00 2001 From: profitroll Date: Thu, 6 Oct 2022 12:48:30 +0200 Subject: [PATCH] Docstring added --- pyrmv/methods/journey_detail.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pyrmv/methods/journey_detail.py b/pyrmv/methods/journey_detail.py index a85d557..fa112dd 100644 --- a/pyrmv/methods/journey_detail.py +++ b/pyrmv/methods/journey_detail.py @@ -21,7 +21,27 @@ def journey_detail( from_index: int = None, to_id: str = None, to_index: int = None - ): + ) -> Journey: + """The journey_detail method will deliver information about the complete route of a vehicle. The journey + identifier is part of a trip or `board_departure` response. It contains a list of all stops/stations of this journey + including all departure and arrival times (with real-time data if available) and additional information like + specific attributes about facilities and other texts. + + More detailed request is available as `raw.journey_detail()`, however returns `dict` instead of `Journey`. + + ### Args: + * access_id (`str`): Access ID for identifying the requesting client. Get your key on [RMV website](https://opendata.rmv.de/site/start.html). + * id (`str`): Specifies the internal journey id of the journey shall be retrieved. Maximum length 512. + * date (`Union[str, datetime]`, **optional**): Day of operation. Represented in the format `YYYY-MM-DD` or as a datetime object. By default the current server date is used. Defaults to `None`. + * real_time_mode (`Literal[RealTimeMode.FULL, RealTimeMode.INFOS, RealTimeMode.OFF, RealTimeMode.REALTIME, RealTimeMode.SERVER_DEFAULT]`, **optional**): Set the realtime mode to be used. Read more about this in HAFAS ReST Documentation. Defaults to `None`. + * from_id (`str`, **optional**): Specifies the station/stop ID the partial itinerary shall start from. Defaults to `None`. + * from_index (`int`, **optional**): Specifies the station/stop index the partial itinerary shall start from. Defaults to `None`. + * to_id (`str`, **optional**): Specifies the station/stop ID the partial itinerary shall end at. Defaults to `None`. + * to_index (`int`, **optional**): Specifies the station/stop index the partial itinerary shall end at. Defaults to `None`. + + ### Returns: + * Journey: Instance of Journey object. + """ journey_raw = raw_journey_detail( accessId=access_id,