diff --git a/wiki/Home.md b/wiki/Home.md index 498c410..ac9b491 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -2,4 +2,38 @@ Welcome to the project's Wiki. -Conceptional there are two different types of methods. Normal and raw ones. Raw methods are only beautiful variant of HTTP requests, nothing except for that actually. Normal ones are meant to be used as objects. You can still provide strings here and there, but basic concept is focused on objects usage. \ No newline at end of file +This module aims to provide eased access to RMV's OpenData API endpoints and enable some home-projects to show the data about public transit state at the moment. As for now, async is not supported and is not necessarily planned in the future, so bigger projects should consider this before using this module in the first place. + +## Basic concepts behind + +So the module `pyrmv` has two options to choose from when it comes to the usage: + +1. Using higher-level methods of the class [pyrmv.Client](https://git.end-play.xyz/profitroll/PythonRMV/wiki/Client). These methods provide pythonic objects, can throw exceptions and are overall pretty neat. +2. Using raw functions from [pyrmv.raw](https://git.end-play.xyz/profitroll/PythonRMV/wiki/Raw-Functions). These functions are basically a small interface for HTTP requests that happen in the background and have little to no processing behind the scenes. + +Your preferred variant depends on the use case, but usually higher-level methods of the Client should be the match. + +## Objects + +This module does **not** use the [FPTF](https://github.com/public-transport/friendly-public-transport-format) because it aims to give full access to the API RMV provides, thus objects Client gives you will contain a bit more information. + +These objects are implemented in pyrmv: + +* [BoardArrival](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.BoardArrival) +* [BoardDeparture](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.BoardDeparture) +* [LineArrival](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.LineArrival) +* [LineDeparture](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.LineDeparture) +* [Gis](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Gis) +* [Journey](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Journey) +* [Leg](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Leg) +* [Channel](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Channel) +* [Message](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Message) +* [Url](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Url) +* [Stop](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Stop) +* [StopTrip](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.StopTrip) +* [Trip](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Trip) +* ~~[Ticket](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Ticket)~~ (WIP) + +## Note for bigger projects + +As you may already know, bigger projects like [Öffi](https://gitlab.com/oeffi/oeffi) and [DB Navigator](https://play.google.com/store/apps/details?id=de.hafas.android.db) use NVV's API instead of RMV's for navigation and public transit querying. Reasons behind this are clear as day and from perspective of pyrmv it's highly recommended you also choose that way, because RMV loves to change or break their API in unexpected places and does not cooperate with developers well enough when they do so. diff --git a/wiki/Raw-Functions.md b/wiki/Raw-Functions.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/Raw-Functions.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index a7b5992..7fd228d 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -1,15 +1,21 @@ -## [Home](https://git.end-play.xyz/profitroll/PythonRMV/wiki) +# [Home](https://git.end-play.xyz/profitroll/PythonRMV/wiki) -### Classes -* [Client](https://git.end-play.xyz/profitroll/PythonRMV/wiki/Client) +## Classes -### Methods -* [board_arrival](https://git.end-play.xyz/profitroll/PythonRMV/wiki/board_arrival) -* [board_departure](https://git.end-play.xyz/profitroll/PythonRMV/wiki/board_departure) -* [him_search](https://git.end-play.xyz/profitroll/PythonRMV/wiki/him_search) -* [journey_detail](https://git.end-play.xyz/profitroll/PythonRMV/wiki/journey_detail) -* [stop_by_coords](https://git.end-play.xyz/profitroll/PythonRMV/wiki/stop_by_coords) -* [stop_by_id](https://git.end-play.xyz/profitroll/PythonRMV/wiki/stop_by_id) -* [stop_by_name](https://git.end-play.xyz/profitroll/PythonRMV/wiki/stop_by_name) -* [trip_find](https://git.end-play.xyz/profitroll/PythonRMV/wiki/trip_find) -* [trip_recon](https://git.end-play.xyz/profitroll/PythonRMV/wiki/trip_recon) \ No newline at end of file +* [Client](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client) + +## Methods + +* [board_arrival](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.board_arrival) +* [board_departure](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.board_departure) +* [him_search](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.him_search) +* [journey_detail](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.journey_detail) +* [stop_by_coords](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.stop_by_coords) +* [stop_by_id](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.stop_by_id) +* [stop_by_name](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.stop_by_name) +* [trip_find](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.trip_find) +* [trip_recon](https://git.end-play.xyz/profitroll/PythonRMV/wiki/classes.Client.trip_recon) + +## Raw functions + +* [List of raw functions](https://git.end-play.xyz/profitroll/PythonRMV/wiki/Raw-Functions) diff --git a/wiki/classes/BoardArrival.md b/wiki/classes/BoardArrival.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/BoardArrival.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/BoardDeparture.md b/wiki/classes/BoardDeparture.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/BoardDeparture.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Channel.md b/wiki/classes/Channel.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Channel.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/Client.md b/wiki/classes/Client/Client.md similarity index 85% rename from wiki/Client.md rename to wiki/classes/Client/Client.md index 5f875c0..8549979 100644 --- a/wiki/Client.md +++ b/wiki/classes/Client/Client.md @@ -1,5 +1,6 @@ -# PythonRMV Client -You are now viewing the main class of the module, its heart. The main Client class, all available normal methods can be found here. +# Client + +You are now viewing the main class of the module, all available higher-level methods can be found here. This page is about the Client class, which exposes high-level methods for an easy access to the API. @@ -11,14 +12,14 @@ client = Client("SampleAPIKey") print(client.stop_by_id("A=1@O=Offenbach (Main)-Zentrum Marktplatz\/Frankf. Straße@X=8764456@Y=50105181@U=80@L=3002510@")) ``` -# Details - -## `class pyrmv.Client` +## Details ### Parameters + * access_key (`str`) – Access ID for identifying the requesting client. Get your key on [RMV website](https://opendata.rmv.de/site/start.html). -### Methods: +### Methods + * [board_arrival](https://git.end-play.xyz/profitroll/PythonRMV/wiki/board_arrival) -> `BoardArrival` * [board_departure](https://git.end-play.xyz/profitroll/PythonRMV/wiki/board_departure) -> `BoardDeparture` * [him_search](https://git.end-play.xyz/profitroll/PythonRMV/wiki/him_search) -> `List[Message]` @@ -27,4 +28,4 @@ print(client.stop_by_id("A=1@O=Offenbach (Main)-Zentrum Marktplatz\/Frankf. Stra * [stop_by_id](https://git.end-play.xyz/profitroll/PythonRMV/wiki/stop_by_id) -> `Union[Stop, None]` * [stop_by_name](https://git.end-play.xyz/profitroll/PythonRMV/wiki/stop_by_name) -> `List[Stop]` * [trip_find](https://git.end-play.xyz/profitroll/PythonRMV/wiki/trip_find) -> `List[Trip]` -* [trip_recon](https://git.end-play.xyz/profitroll/PythonRMV/wiki/trip_recon) -> `List[Trip]` \ No newline at end of file +* [trip_recon](https://git.end-play.xyz/profitroll/PythonRMV/wiki/trip_recon) -> `List[Trip]` diff --git a/wiki/classes/Client/methods/Client.board_arrival.md b/wiki/classes/Client/methods/Client.board_arrival.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.board_arrival.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.board_departure.md b/wiki/classes/Client/methods/Client.board_departure.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.board_departure.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.him_search.md b/wiki/classes/Client/methods/Client.him_search.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.him_search.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.journey_detail.md b/wiki/classes/Client/methods/Client.journey_detail.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.journey_detail.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.stop_by_coords.md b/wiki/classes/Client/methods/Client.stop_by_coords.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.stop_by_coords.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.stop_by_id.md b/wiki/classes/Client/methods/Client.stop_by_id.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.stop_by_id.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.stop_by_name.md b/wiki/classes/Client/methods/Client.stop_by_name.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.stop_by_name.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.trip_find.md b/wiki/classes/Client/methods/Client.trip_find.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.trip_find.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Client/methods/Client.trip_recon.md b/wiki/classes/Client/methods/Client.trip_recon.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Client/methods/Client.trip_recon.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Gis.md b/wiki/classes/Gis.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Gis.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Journey.md b/wiki/classes/Journey.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Journey.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Leg.md b/wiki/classes/Leg.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Leg.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/LineArrival.md b/wiki/classes/LineArrival.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/LineArrival.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/LineDeparture.md b/wiki/classes/LineDeparture.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/LineDeparture.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Message.md b/wiki/classes/Message.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Message.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Stop.md b/wiki/classes/Stop.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Stop.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/StopTrip.md b/wiki/classes/StopTrip.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/StopTrip.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Ticket.md b/wiki/classes/Ticket.md new file mode 100644 index 0000000..ff713c3 --- /dev/null +++ b/wiki/classes/Ticket.md @@ -0,0 +1 @@ +Class is not available yet. Documentation will appear here after the class is finished. diff --git a/wiki/classes/Trip.md b/wiki/classes/Trip.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Trip.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there. diff --git a/wiki/classes/Url.md b/wiki/classes/Url.md new file mode 100644 index 0000000..7d18af3 --- /dev/null +++ b/wiki/classes/Url.md @@ -0,0 +1 @@ +Docs are not available yet. Please, use the linting in your IDE until the documentation is there.