13 |
14 |
15 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/python-client/.openapi-generator-ignore:
--------------------------------------------------------------------------------
1 | # OpenAPI Generator Ignore
2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3 |
4 | # Use this file to prevent files from being overwritten by the generator.
5 | # The patterns follow closely to .gitignore or .dockerignore.
6 |
7 | # As an example, the C# client generator defines ApiClient.cs.
8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9 | #ApiClient.cs
10 |
11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12 | #foo/*/qux
13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14 |
15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16 | #foo/**/qux
17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18 |
19 | # You can also negate patterns with an exclamation (!).
20 | # For example, you can ignore all files in a docs folder with the file extension .md:
21 | #docs/*.md
22 | # Then explicitly reverse the ignore rule for a single file:
23 | #!docs/README.md
24 |
--------------------------------------------------------------------------------
/python-client/.openapi-generator/FILES:
--------------------------------------------------------------------------------
1 | .gitignore
2 | .gitlab-ci.yml
3 | .openapi-generator-ignore
4 | .travis.yml
5 | README.md
6 | create_doc.py
7 | docs/AbfahrtDto.md
8 | docs/AbfahrtenAPIResponse.md
9 | docs/AbfahrtenApi.md
10 | docs/FahrtDto.md
11 | docs/FahrtenAPIResponse.md
12 | docs/FahrtenApi.md
13 | docs/FahrwegHaltepositionDto.md
14 | docs/HaltestelleDto.md
15 | docs/HaltestellenAPIResponse.md
16 | docs/HaltestellenApi.md
17 | docs/Metadata.md
18 | git_push.sh
19 | pyproject.toml
20 | rename_generated_code.py
21 | requirements.txt
22 | requirements.txt
23 | setup.cfg
24 | setup.py
25 | test-requirements.txt
26 | test/__init__.py
27 | test/test_abfahrt_dto.py
28 | test/test_abfahrten_api.py
29 | test/test_abfahrten_api_response.py
30 | test/test_fahrt_dto.py
31 | test/test_fahrten_api.py
32 | test/test_fahrten_api_response.py
33 | test/test_fahrweg_halteposition_dto.py
34 | test/test_haltestelle_dto.py
35 | test/test_haltestellen_api.py
36 | test/test_haltestellen_api_response.py
37 | test/test_metadata.py
38 | tox.ini
39 | vag/__init__.py
40 | vag/api/__init__.py
41 | vag/api/abfahrten_api.py
42 | vag/api/fahrten_api.py
43 | vag/api/haltestellen_api.py
44 | vag/api_client.py
45 | vag/apis/__init__.py
46 | vag/configuration.py
47 | vag/exceptions.py
48 | vag/model/__init__.py
49 | vag/model/abfahrt_dto.py
50 | vag/model/abfahrten_api_response.py
51 | vag/model/fahrt_dto.py
52 | vag/model/fahrten_api_response.py
53 | vag/model/fahrweg_halteposition_dto.py
54 | vag/model/haltestelle_dto.py
55 | vag/model/haltestellen_api_response.py
56 | vag/model/metadata.py
57 | vag/model_utils.py
58 | vag/models/__init__.py
59 | vag/rest.py
60 |
--------------------------------------------------------------------------------
/python-client/.openapi-generator/VERSION:
--------------------------------------------------------------------------------
1 | 6.1.1-SNAPSHOT
--------------------------------------------------------------------------------
/python-client/README.md:
--------------------------------------------------------------------------------
1 | # vag
2 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht.
3 |
4 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5 |
6 | - API version: v2
7 | - Package version: 0.1.0
8 | - Build package: org.openapitools.codegen.languages.PythonClientCodegen
9 |
10 | ## Requirements.
11 |
12 | Python >= 3.6
13 |
14 | ## Installation & Usage
15 | ### pip install
16 |
17 | ```sh
18 | pip install deutschland[vag]
19 | ```
20 |
21 | ### poetry install
22 |
23 | ```sh
24 | poetry add deutschland -E vag
25 | ```
26 |
27 | ### Setuptools
28 |
29 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
30 |
31 | ```sh
32 | python setup.py install --user
33 | ```
34 | (or `sudo python setup.py install` to install the package for all users)
35 |
36 | ## Usage
37 |
38 | Import the package:
39 | ```python
40 | from deutschland import vag
41 | ```
42 |
43 | ## Getting Started
44 |
45 | Please follow the [installation procedure](#installation--usage) and then run the following:
46 |
47 | ```python
48 |
49 | import time
50 | from deutschland import vag
51 | from pprint import pprint
52 | from deutschland.vag.api import abfahrten_api
53 | from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
54 | # Defining the host is optional and defaults to https://start.vag.de/dm
55 | # See configuration.py for a list of all supported configuration parameters.
56 | configuration = vag.Configuration(
57 | host = "https://start.vag.de/dm"
58 | )
59 |
60 |
61 |
62 | # Enter a context with an instance of the API client
63 | with vag.ApiClient(configuration) as api_client:
64 | # Create an instance of the API class
65 | api_instance = abfahrten_api.AbfahrtenApi(api_client)
66 | netvu = "netvu_example" # str | Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
67 | haltid = "haltid_example" # str | Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG
68 | product = "product_example" # str | Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram (optional)
69 | timespan = 1 # int | Zeitfenster für die Abfrage in Minuten (?timespan=10) (optional)
70 | timedelay = 1 # int | Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5) (optional)
71 | limitcount = 1 # int | Maximale Anzahl der zurückgelieferten Abfahrten (optional)
72 |
73 | try:
74 | # Liefert die Abfahrten zu einer bestimmten Haltestelle
75 | api_response = api_instance.abfahrten_get1(netvu, haltid, product=product, timespan=timespan, timedelay=timedelay, limitcount=limitcount)
76 | pprint(api_response)
77 | except vag.ApiException as e:
78 | print("Exception when calling AbfahrtenApi->abfahrten_get1: %s\n" % e)
79 | ```
80 |
81 | ## Documentation for API Endpoints
82 |
83 | All URIs are relative to *https://start.vag.de/dm*
84 |
85 | Class | Method | HTTP request | Description
86 | ------------ | ------------- | ------------- | -------------
87 | *AbfahrtenApi* | [**abfahrten_get1**](docs/AbfahrtenApi.md#abfahrten_get1) | **GET** /api/v1/abfahrten/{netvu}/{haltid} | Liefert die Abfahrten zu einer bestimmten Haltestelle
88 | *AbfahrtenApi* | [**abfahrten_get2**](docs/AbfahrtenApi.md#abfahrten_get2) | **GET** /api/v1/abfahrten/{netvu}/{haltid}/{line} | Liefert die Abfahrten zu einer bestimmten Haltestelle
89 | *FahrtenApi* | [**fahrten_get**](docs/FahrtenApi.md#fahrten_get) | **GET** /api/v1/fahrten/{betriebszweig} | Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster.
90 | *FahrtenApi* | [**fahrten_get_fahrt1**](docs/FahrtenApi.md#fahrten_get_fahrt1) | **GET** /api/v1/fahrten/{betriebszweig}/{fahrtnummer} | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem aktuellen Betriebstag
91 | *FahrtenApi* | [**fahrten_get_fahrt2**](docs/FahrtenApi.md#fahrten_get_fahrt2) | **GET** /api/v1/fahrten/{betriebszweig}/{betriebstag}/{fahrtnummer} | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem angegebenen Betriebstag
92 | *HaltestellenApi* | [**haltestellen_get_by_location**](docs/HaltestellenApi.md#haltestellen_get_by_location) | **GET** /api/v1/haltestellen/{netvu}/location | Liefert die Liste mit den Haltestellen zu der Umkreissuche
93 | *HaltestellenApi* | [**haltestellen_get_by_name**](docs/HaltestellenApi.md#haltestellen_get_by_name) | **GET** /api/v1/haltestellen/{netvu} | Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional)
94 |
95 |
96 | ## Documentation For Models
97 |
98 | - [AbfahrtDto](docs/AbfahrtDto.md)
99 | - [AbfahrtenAPIResponse](docs/AbfahrtenAPIResponse.md)
100 | - [FahrtDto](docs/FahrtDto.md)
101 | - [FahrtenAPIResponse](docs/FahrtenAPIResponse.md)
102 | - [FahrwegHaltepositionDto](docs/FahrwegHaltepositionDto.md)
103 | - [HaltestelleDto](docs/HaltestelleDto.md)
104 | - [HaltestellenAPIResponse](docs/HaltestellenAPIResponse.md)
105 | - [Metadata](docs/Metadata.md)
106 |
107 |
108 | ## Documentation For Authorization
109 |
110 | All endpoints do not require authorization.
111 |
112 | ## Author
113 |
114 | kontakt@bund.dev
115 |
116 |
117 | ## Notes for Large OpenAPI documents
118 | If the OpenAPI document is large, imports in vag.apis and vag.models may fail with a
119 | RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
120 |
121 | Solution 1:
122 | Use specific imports for apis and models like:
123 | - `from deutschland.vag.api.default_api import DefaultApi`
124 | - `from deutschland.vag.model.pet import Pet`
125 |
126 | Solution 2:
127 | Before importing the package, adjust the maximum recursion limit as shown below:
128 | ```
129 | import sys
130 | sys.setrecursionlimit(1500)
131 | from deutschland import vag
132 | from deutschland.vag.apis import *
133 | from deutschland.vag.models import *
134 | ```
135 |
136 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | """
4 | VAG API
5 |
6 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
7 |
8 | The version of the OpenAPI document: v2
9 | Contact: kontakt@bund.dev
10 | Generated by: https://openapi-generator.tech
11 | """
12 |
13 |
14 | __version__ = "0.1.0"
15 |
16 | # import ApiClient
17 | from deutschland.vag.api_client import ApiClient
18 |
19 | # import Configuration
20 | from deutschland.vag.configuration import Configuration
21 |
22 | # import exceptions
23 | from deutschland.vag.exceptions import (
24 | ApiAttributeError,
25 | ApiException,
26 | ApiKeyError,
27 | ApiTypeError,
28 | ApiValueError,
29 | OpenApiException,
30 | )
31 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/api/__init__.py:
--------------------------------------------------------------------------------
1 | # do not import all apis into this module because that uses a lot of memory and stack frames
2 | # if you need the ability to import all apis from one package, import them with
3 | # from deutschland.vag.apis import AbfahrtenApi
4 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/api/abfahrten_api.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.api_client import ApiClient
16 | from deutschland.vag.api_client import Endpoint as _Endpoint
17 | from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
18 | from deutschland.vag.model_utils import ( # noqa: F401
19 | check_allowed_values,
20 | check_validations,
21 | date,
22 | datetime,
23 | file_type,
24 | none_type,
25 | validate_and_convert_types,
26 | )
27 |
28 |
29 | class AbfahrtenApi(object):
30 | """NOTE: This class is auto generated by OpenAPI Generator
31 | Ref: https://openapi-generator.tech
32 |
33 | Do not edit the class manually.
34 | """
35 |
36 | def __init__(self, api_client=None):
37 | if api_client is None:
38 | api_client = ApiClient()
39 | self.api_client = api_client
40 | self.abfahrten_get1_endpoint = _Endpoint(
41 | settings={
42 | "response_type": (AbfahrtenAPIResponse,),
43 | "auth": [],
44 | "endpoint_path": "/api/v1/abfahrten/{netvu}/{haltid}",
45 | "operation_id": "abfahrten_get1",
46 | "http_method": "GET",
47 | "servers": None,
48 | },
49 | params_map={
50 | "all": [
51 | "netvu",
52 | "haltid",
53 | "product",
54 | "timespan",
55 | "timedelay",
56 | "limitcount",
57 | ],
58 | "required": [
59 | "netvu",
60 | "haltid",
61 | ],
62 | "nullable": [],
63 | "enum": [],
64 | "validation": [],
65 | },
66 | root_map={
67 | "validations": {},
68 | "allowed_values": {},
69 | "openapi_types": {
70 | "netvu": (str,),
71 | "haltid": (str,),
72 | "product": (str,),
73 | "timespan": (int,),
74 | "timedelay": (int,),
75 | "limitcount": (int,),
76 | },
77 | "attribute_map": {
78 | "netvu": "netvu",
79 | "haltid": "haltid",
80 | "product": "product",
81 | "timespan": "timespan",
82 | "timedelay": "timedelay",
83 | "limitcount": "limitcount",
84 | },
85 | "location_map": {
86 | "netvu": "path",
87 | "haltid": "path",
88 | "product": "query",
89 | "timespan": "query",
90 | "timedelay": "query",
91 | "limitcount": "query",
92 | },
93 | "collection_format_map": {},
94 | },
95 | headers_map={
96 | "accept": [
97 | "application/json",
98 | "text/json",
99 | "application/xml",
100 | "text/xml",
101 | ],
102 | "content_type": [],
103 | },
104 | api_client=api_client,
105 | )
106 | self.abfahrten_get2_endpoint = _Endpoint(
107 | settings={
108 | "response_type": (AbfahrtenAPIResponse,),
109 | "auth": [],
110 | "endpoint_path": "/api/v1/abfahrten/{netvu}/{haltid}/{line}",
111 | "operation_id": "abfahrten_get2",
112 | "http_method": "GET",
113 | "servers": None,
114 | },
115 | params_map={
116 | "all": [
117 | "netvu",
118 | "haltid",
119 | "line",
120 | "product",
121 | "timespan",
122 | "timedelay",
123 | "limitcount",
124 | ],
125 | "required": [
126 | "netvu",
127 | "haltid",
128 | "line",
129 | ],
130 | "nullable": [],
131 | "enum": [],
132 | "validation": [],
133 | },
134 | root_map={
135 | "validations": {},
136 | "allowed_values": {},
137 | "openapi_types": {
138 | "netvu": (str,),
139 | "haltid": (str,),
140 | "line": (str,),
141 | "product": (str,),
142 | "timespan": (int,),
143 | "timedelay": (int,),
144 | "limitcount": (int,),
145 | },
146 | "attribute_map": {
147 | "netvu": "netvu",
148 | "haltid": "haltid",
149 | "line": "line",
150 | "product": "product",
151 | "timespan": "timespan",
152 | "timedelay": "timedelay",
153 | "limitcount": "limitcount",
154 | },
155 | "location_map": {
156 | "netvu": "path",
157 | "haltid": "path",
158 | "line": "path",
159 | "product": "query",
160 | "timespan": "query",
161 | "timedelay": "query",
162 | "limitcount": "query",
163 | },
164 | "collection_format_map": {},
165 | },
166 | headers_map={
167 | "accept": [
168 | "application/json",
169 | "text/json",
170 | "application/xml",
171 | "text/xml",
172 | ],
173 | "content_type": [],
174 | },
175 | api_client=api_client,
176 | )
177 |
178 | def abfahrten_get1(self, netvu, haltid, **kwargs):
179 | """Liefert die Abfahrten zu einer bestimmten Haltestelle # noqa: E501
180 |
181 | This method makes a synchronous HTTP request by default. To make an
182 | asynchronous HTTP request, please pass async_req=True
183 |
184 | >>> thread = api.abfahrten_get1(netvu, haltid, async_req=True)
185 | >>> result = thread.get()
186 |
187 | Args:
188 | netvu (str): Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
189 | haltid (str): Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG
190 |
191 | Keyword Args:
192 | product (str): Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram. [optional]
193 | timespan (int): Zeitfenster für die Abfrage in Minuten (?timespan=10). [optional]
194 | timedelay (int): Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5). [optional]
195 | limitcount (int): Maximale Anzahl der zurückgelieferten Abfahrten. [optional]
196 | _return_http_data_only (bool): response data without head status
197 | code and headers. Default is True.
198 | _preload_content (bool): if False, the urllib3.HTTPResponse object
199 | will be returned without reading/decoding response data.
200 | Default is True.
201 | _request_timeout (int/float/tuple): timeout setting for this request. If
202 | one number provided, it will be total request timeout. It can also
203 | be a pair (tuple) of (connection, read) timeouts.
204 | Default is None.
205 | _check_input_type (bool): specifies if type checking
206 | should be done one the data sent to the server.
207 | Default is True.
208 | _check_return_type (bool): specifies if type checking
209 | should be done one the data received from the server.
210 | Default is True.
211 | _spec_property_naming (bool): True if the variable names in the input data
212 | are serialized names, as specified in the OpenAPI document.
213 | False if the variable names in the input data
214 | are pythonic names, e.g. snake case (default)
215 | _content_type (str/None): force body content-type.
216 | Default is None and content-type will be predicted by allowed
217 | content-types and body.
218 | _host_index (int/None): specifies the index of the server
219 | that we want to use.
220 | Default is read from the configuration.
221 | _request_auths (list): set to override the auth_settings for an a single
222 | request; this effectively ignores the authentication
223 | in the spec for a single request.
224 | Default is None
225 | async_req (bool): execute request asynchronously
226 |
227 | Returns:
228 | AbfahrtenAPIResponse
229 | If the method is called asynchronously, returns the request
230 | thread.
231 | """
232 | kwargs["async_req"] = kwargs.get("async_req", False)
233 | kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
234 | kwargs["_preload_content"] = kwargs.get("_preload_content", True)
235 | kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
236 | kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
237 | kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
238 | kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
239 | kwargs["_content_type"] = kwargs.get("_content_type")
240 | kwargs["_host_index"] = kwargs.get("_host_index")
241 | kwargs["_request_auths"] = kwargs.get("_request_auths", None)
242 | kwargs["netvu"] = netvu
243 | kwargs["haltid"] = haltid
244 | return self.abfahrten_get1_endpoint.call_with_http_info(**kwargs)
245 |
246 | def abfahrten_get2(self, netvu, haltid, line, **kwargs):
247 | """Liefert die Abfahrten zu einer bestimmten Haltestelle # noqa: E501
248 |
249 | This method makes a synchronous HTTP request by default. To make an
250 | asynchronous HTTP request, please pass async_req=True
251 |
252 | >>> thread = api.abfahrten_get2(netvu, haltid, line, async_req=True)
253 | >>> result = thread.get()
254 |
255 | Args:
256 | netvu (str): Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
257 | haltid (str): Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG
258 | line (str): Linienkürzel der VAG
259 |
260 | Keyword Args:
261 | product (str): Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram. [optional]
262 | timespan (int): Zeitfenster für die Abfrage in Minuten (?timespan=10). [optional]
263 | timedelay (int): Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5). [optional]
264 | limitcount (int): Maximale Anzahl der zurückgelieferten Abfahrten. [optional]
265 | _return_http_data_only (bool): response data without head status
266 | code and headers. Default is True.
267 | _preload_content (bool): if False, the urllib3.HTTPResponse object
268 | will be returned without reading/decoding response data.
269 | Default is True.
270 | _request_timeout (int/float/tuple): timeout setting for this request. If
271 | one number provided, it will be total request timeout. It can also
272 | be a pair (tuple) of (connection, read) timeouts.
273 | Default is None.
274 | _check_input_type (bool): specifies if type checking
275 | should be done one the data sent to the server.
276 | Default is True.
277 | _check_return_type (bool): specifies if type checking
278 | should be done one the data received from the server.
279 | Default is True.
280 | _spec_property_naming (bool): True if the variable names in the input data
281 | are serialized names, as specified in the OpenAPI document.
282 | False if the variable names in the input data
283 | are pythonic names, e.g. snake case (default)
284 | _content_type (str/None): force body content-type.
285 | Default is None and content-type will be predicted by allowed
286 | content-types and body.
287 | _host_index (int/None): specifies the index of the server
288 | that we want to use.
289 | Default is read from the configuration.
290 | _request_auths (list): set to override the auth_settings for an a single
291 | request; this effectively ignores the authentication
292 | in the spec for a single request.
293 | Default is None
294 | async_req (bool): execute request asynchronously
295 |
296 | Returns:
297 | AbfahrtenAPIResponse
298 | If the method is called asynchronously, returns the request
299 | thread.
300 | """
301 | kwargs["async_req"] = kwargs.get("async_req", False)
302 | kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
303 | kwargs["_preload_content"] = kwargs.get("_preload_content", True)
304 | kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
305 | kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
306 | kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
307 | kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
308 | kwargs["_content_type"] = kwargs.get("_content_type")
309 | kwargs["_host_index"] = kwargs.get("_host_index")
310 | kwargs["_request_auths"] = kwargs.get("_request_auths", None)
311 | kwargs["netvu"] = netvu
312 | kwargs["haltid"] = haltid
313 | kwargs["line"] = line
314 | return self.abfahrten_get2_endpoint.call_with_http_info(**kwargs)
315 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/api/haltestellen_api.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.api_client import ApiClient
16 | from deutschland.vag.api_client import Endpoint as _Endpoint
17 | from deutschland.vag.model.haltestellen_api_response import HaltestellenAPIResponse
18 | from deutschland.vag.model_utils import ( # noqa: F401
19 | check_allowed_values,
20 | check_validations,
21 | date,
22 | datetime,
23 | file_type,
24 | none_type,
25 | validate_and_convert_types,
26 | )
27 |
28 |
29 | class HaltestellenApi(object):
30 | """NOTE: This class is auto generated by OpenAPI Generator
31 | Ref: https://openapi-generator.tech
32 |
33 | Do not edit the class manually.
34 | """
35 |
36 | def __init__(self, api_client=None):
37 | if api_client is None:
38 | api_client = ApiClient()
39 | self.api_client = api_client
40 | self.haltestellen_get_by_location_endpoint = _Endpoint(
41 | settings={
42 | "response_type": (HaltestellenAPIResponse,),
43 | "auth": [],
44 | "endpoint_path": "/api/v1/haltestellen/{netvu}/location",
45 | "operation_id": "haltestellen_get_by_location",
46 | "http_method": "GET",
47 | "servers": None,
48 | },
49 | params_map={
50 | "all": [
51 | "netvu",
52 | "lon",
53 | "lat",
54 | "radius",
55 | ],
56 | "required": [
57 | "netvu",
58 | "lon",
59 | "lat",
60 | ],
61 | "nullable": [],
62 | "enum": [],
63 | "validation": [],
64 | },
65 | root_map={
66 | "validations": {},
67 | "allowed_values": {},
68 | "openapi_types": {
69 | "netvu": (str,),
70 | "lon": (float,),
71 | "lat": (float,),
72 | "radius": (int,),
73 | },
74 | "attribute_map": {
75 | "netvu": "netvu",
76 | "lon": "lon",
77 | "lat": "lat",
78 | "radius": "radius",
79 | },
80 | "location_map": {
81 | "netvu": "path",
82 | "lon": "query",
83 | "lat": "query",
84 | "radius": "query",
85 | },
86 | "collection_format_map": {},
87 | },
88 | headers_map={
89 | "accept": [
90 | "application/json",
91 | "text/json",
92 | "application/xml",
93 | "text/xml",
94 | ],
95 | "content_type": [],
96 | },
97 | api_client=api_client,
98 | )
99 | self.haltestellen_get_by_name_endpoint = _Endpoint(
100 | settings={
101 | "response_type": (HaltestellenAPIResponse,),
102 | "auth": [],
103 | "endpoint_path": "/api/v1/haltestellen/{netvu}",
104 | "operation_id": "haltestellen_get_by_name",
105 | "http_method": "GET",
106 | "servers": None,
107 | },
108 | params_map={
109 | "all": [
110 | "netvu",
111 | "name",
112 | ],
113 | "required": [
114 | "netvu",
115 | "name",
116 | ],
117 | "nullable": [],
118 | "enum": [],
119 | "validation": [],
120 | },
121 | root_map={
122 | "validations": {},
123 | "allowed_values": {},
124 | "openapi_types": {
125 | "netvu": (str,),
126 | "name": (str,),
127 | },
128 | "attribute_map": {
129 | "netvu": "netvu",
130 | "name": "name",
131 | },
132 | "location_map": {
133 | "netvu": "path",
134 | "name": "query",
135 | },
136 | "collection_format_map": {},
137 | },
138 | headers_map={
139 | "accept": [
140 | "application/json",
141 | "text/json",
142 | "application/xml",
143 | "text/xml",
144 | ],
145 | "content_type": [],
146 | },
147 | api_client=api_client,
148 | )
149 |
150 | def haltestellen_get_by_location(self, netvu, lon, lat, **kwargs):
151 | """Liefert die Liste mit den Haltestellen zu der Umkreissuche # noqa: E501
152 |
153 | This method makes a synchronous HTTP request by default. To make an
154 | asynchronous HTTP request, please pass async_req=True
155 |
156 | >>> thread = api.haltestellen_get_by_location(netvu, lon, lat, async_req=True)
157 | >>> result = thread.get()
158 |
159 | Args:
160 | netvu (str): Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
161 | lon (float): Longitude für die Umkreissuche in WGS 84 Format in Grad
162 | lat (float): Latitude für die Umkreissuche in WGS 84 Format in Grad
163 |
164 | Keyword Args:
165 | radius (int): Radius für die Umkreissuche. Defaultwert = 1000 Meter.. [optional]
166 | _return_http_data_only (bool): response data without head status
167 | code and headers. Default is True.
168 | _preload_content (bool): if False, the urllib3.HTTPResponse object
169 | will be returned without reading/decoding response data.
170 | Default is True.
171 | _request_timeout (int/float/tuple): timeout setting for this request. If
172 | one number provided, it will be total request timeout. It can also
173 | be a pair (tuple) of (connection, read) timeouts.
174 | Default is None.
175 | _check_input_type (bool): specifies if type checking
176 | should be done one the data sent to the server.
177 | Default is True.
178 | _check_return_type (bool): specifies if type checking
179 | should be done one the data received from the server.
180 | Default is True.
181 | _spec_property_naming (bool): True if the variable names in the input data
182 | are serialized names, as specified in the OpenAPI document.
183 | False if the variable names in the input data
184 | are pythonic names, e.g. snake case (default)
185 | _content_type (str/None): force body content-type.
186 | Default is None and content-type will be predicted by allowed
187 | content-types and body.
188 | _host_index (int/None): specifies the index of the server
189 | that we want to use.
190 | Default is read from the configuration.
191 | _request_auths (list): set to override the auth_settings for an a single
192 | request; this effectively ignores the authentication
193 | in the spec for a single request.
194 | Default is None
195 | async_req (bool): execute request asynchronously
196 |
197 | Returns:
198 | HaltestellenAPIResponse
199 | If the method is called asynchronously, returns the request
200 | thread.
201 | """
202 | kwargs["async_req"] = kwargs.get("async_req", False)
203 | kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
204 | kwargs["_preload_content"] = kwargs.get("_preload_content", True)
205 | kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
206 | kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
207 | kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
208 | kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
209 | kwargs["_content_type"] = kwargs.get("_content_type")
210 | kwargs["_host_index"] = kwargs.get("_host_index")
211 | kwargs["_request_auths"] = kwargs.get("_request_auths", None)
212 | kwargs["netvu"] = netvu
213 | kwargs["lon"] = lon
214 | kwargs["lat"] = lat
215 | return self.haltestellen_get_by_location_endpoint.call_with_http_info(**kwargs)
216 |
217 | def haltestellen_get_by_name(self, netvu, name, **kwargs):
218 | """Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional) # noqa: E501
219 |
220 | This method makes a synchronous HTTP request by default. To make an
221 | asynchronous HTTP request, please pass async_req=True
222 |
223 | >>> thread = api.haltestellen_get_by_name(netvu, name, async_req=True)
224 | >>> result = thread.get()
225 |
226 | Args:
227 | netvu (str): Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
228 | name (str): Name der Haltestelle (like)
229 |
230 | Keyword Args:
231 | _return_http_data_only (bool): response data without head status
232 | code and headers. Default is True.
233 | _preload_content (bool): if False, the urllib3.HTTPResponse object
234 | will be returned without reading/decoding response data.
235 | Default is True.
236 | _request_timeout (int/float/tuple): timeout setting for this request. If
237 | one number provided, it will be total request timeout. It can also
238 | be a pair (tuple) of (connection, read) timeouts.
239 | Default is None.
240 | _check_input_type (bool): specifies if type checking
241 | should be done one the data sent to the server.
242 | Default is True.
243 | _check_return_type (bool): specifies if type checking
244 | should be done one the data received from the server.
245 | Default is True.
246 | _spec_property_naming (bool): True if the variable names in the input data
247 | are serialized names, as specified in the OpenAPI document.
248 | False if the variable names in the input data
249 | are pythonic names, e.g. snake case (default)
250 | _content_type (str/None): force body content-type.
251 | Default is None and content-type will be predicted by allowed
252 | content-types and body.
253 | _host_index (int/None): specifies the index of the server
254 | that we want to use.
255 | Default is read from the configuration.
256 | _request_auths (list): set to override the auth_settings for an a single
257 | request; this effectively ignores the authentication
258 | in the spec for a single request.
259 | Default is None
260 | async_req (bool): execute request asynchronously
261 |
262 | Returns:
263 | HaltestellenAPIResponse
264 | If the method is called asynchronously, returns the request
265 | thread.
266 | """
267 | kwargs["async_req"] = kwargs.get("async_req", False)
268 | kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
269 | kwargs["_preload_content"] = kwargs.get("_preload_content", True)
270 | kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
271 | kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
272 | kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
273 | kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
274 | kwargs["_content_type"] = kwargs.get("_content_type")
275 | kwargs["_host_index"] = kwargs.get("_host_index")
276 | kwargs["_request_auths"] = kwargs.get("_request_auths", None)
277 | kwargs["netvu"] = netvu
278 | kwargs["name"] = name
279 | return self.haltestellen_get_by_name_endpoint.call_with_http_info(**kwargs)
280 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/apis/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | # Import all APIs into this package.
4 | # If you have many APIs here with many many models used in each API this may
5 | # raise a `RecursionError`.
6 | # In order to avoid this, import only the API that you directly need like:
7 | #
8 | # from deutschland.vag.api.abfahrten_api import AbfahrtenApi
9 | #
10 | # or import this package, but before doing it, use:
11 | #
12 | # import sys
13 | # sys.setrecursionlimit(n)
14 |
15 | # Import APIs into API package:
16 | from deutschland.vag.api.abfahrten_api import AbfahrtenApi
17 | from deutschland.vag.api.fahrten_api import FahrtenApi
18 | from deutschland.vag.api.haltestellen_api import HaltestellenApi
19 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/exceptions.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | class OpenApiException(Exception):
13 | """The base exception class for all OpenAPIExceptions"""
14 |
15 |
16 | class ApiTypeError(OpenApiException, TypeError):
17 | def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None):
18 | """Raises an exception for TypeErrors
19 |
20 | Args:
21 | msg (str): the exception message
22 |
23 | Keyword Args:
24 | path_to_item (list): a list of keys an indices to get to the
25 | current_item
26 | None if unset
27 | valid_classes (tuple): the primitive classes that current item
28 | should be an instance of
29 | None if unset
30 | key_type (bool): False if our value is a value in a dict
31 | True if it is a key in a dict
32 | False if our item is an item in a list
33 | None if unset
34 | """
35 | self.path_to_item = path_to_item
36 | self.valid_classes = valid_classes
37 | self.key_type = key_type
38 | full_msg = msg
39 | if path_to_item:
40 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
41 | super(ApiTypeError, self).__init__(full_msg)
42 |
43 |
44 | class ApiValueError(OpenApiException, ValueError):
45 | def __init__(self, msg, path_to_item=None):
46 | """
47 | Args:
48 | msg (str): the exception message
49 |
50 | Keyword Args:
51 | path_to_item (list) the path to the exception in the
52 | received_data dict. None if unset
53 | """
54 |
55 | self.path_to_item = path_to_item
56 | full_msg = msg
57 | if path_to_item:
58 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
59 | super(ApiValueError, self).__init__(full_msg)
60 |
61 |
62 | class ApiAttributeError(OpenApiException, AttributeError):
63 | def __init__(self, msg, path_to_item=None):
64 | """
65 | Raised when an attribute reference or assignment fails.
66 |
67 | Args:
68 | msg (str): the exception message
69 |
70 | Keyword Args:
71 | path_to_item (None/list) the path to the exception in the
72 | received_data dict
73 | """
74 | self.path_to_item = path_to_item
75 | full_msg = msg
76 | if path_to_item:
77 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
78 | super(ApiAttributeError, self).__init__(full_msg)
79 |
80 |
81 | class ApiKeyError(OpenApiException, KeyError):
82 | def __init__(self, msg, path_to_item=None):
83 | """
84 | Args:
85 | msg (str): the exception message
86 |
87 | Keyword Args:
88 | path_to_item (None/list) the path to the exception in the
89 | received_data dict
90 | """
91 | self.path_to_item = path_to_item
92 | full_msg = msg
93 | if path_to_item:
94 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
95 | super(ApiKeyError, self).__init__(full_msg)
96 |
97 |
98 | class ApiException(OpenApiException):
99 | def __init__(self, status=None, reason=None, http_resp=None):
100 | if http_resp:
101 | self.status = http_resp.status
102 | self.reason = http_resp.reason
103 | self.body = http_resp.data
104 | self.headers = http_resp.getheaders()
105 | else:
106 | self.status = status
107 | self.reason = reason
108 | self.body = None
109 | self.headers = None
110 |
111 | def __str__(self):
112 | """Custom error messages for exception"""
113 | error_message = "Status Code: {0}\n" "Reason: {1}\n".format(
114 | self.status, self.reason
115 | )
116 | if self.headers:
117 | error_message += "HTTP response headers: {0}\n".format(self.headers)
118 |
119 | if self.body:
120 | error_message += "HTTP response body: {0}\n".format(self.body)
121 |
122 | return error_message
123 |
124 |
125 | class NotFoundException(ApiException):
126 | def __init__(self, status=None, reason=None, http_resp=None):
127 | super(NotFoundException, self).__init__(status, reason, http_resp)
128 |
129 |
130 | class UnauthorizedException(ApiException):
131 | def __init__(self, status=None, reason=None, http_resp=None):
132 | super(UnauthorizedException, self).__init__(status, reason, http_resp)
133 |
134 |
135 | class ForbiddenException(ApiException):
136 | def __init__(self, status=None, reason=None, http_resp=None):
137 | super(ForbiddenException, self).__init__(status, reason, http_resp)
138 |
139 |
140 | class ServiceException(ApiException):
141 | def __init__(self, status=None, reason=None, http_resp=None):
142 | super(ServiceException, self).__init__(status, reason, http_resp)
143 |
144 |
145 | def render_path(path_to_item):
146 | """Returns a string representation of a path"""
147 | result = ""
148 | for pth in path_to_item:
149 | if isinstance(pth, int):
150 | result += "[{0}]".format(pth)
151 | else:
152 | result += "['{0}']".format(pth)
153 | return result
154 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/__init__.py:
--------------------------------------------------------------------------------
1 | # we can not import model classes here because that would create a circular
2 | # reference which would not work in python2
3 | # do not import all models into this module because that uses a lot of memory and stack frames
4 | # if you need the ability to import all models from one package, import them with
5 | # from deutschland.vag.models import ModelA, ModelB
6 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/abfahrten_api_response.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.vag.model.abfahrt_dto import AbfahrtDto
35 | from deutschland.vag.model.metadata import Metadata
36 |
37 | globals()["AbfahrtDto"] = AbfahrtDto
38 | globals()["Metadata"] = Metadata
39 |
40 |
41 | class AbfahrtenAPIResponse(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "metadata": (Metadata,), # noqa: E501
103 | "haltestellenname": (str,), # noqa: E501
104 | "vag_kennung": (str,), # noqa: E501
105 | "vgn_kennung": (int,), # noqa: E501
106 | "abfahrten": ([AbfahrtDto],), # noqa: E501
107 | "sonderinformationen": ([str],), # noqa: E501
108 | }
109 |
110 | @cached_property
111 | def discriminator():
112 | return None
113 |
114 | attribute_map = {
115 | "metadata": "Metadata", # noqa: E501
116 | "haltestellenname": "Haltestellenname", # noqa: E501
117 | "vag_kennung": "VAGKennung", # noqa: E501
118 | "vgn_kennung": "VGNKennung", # noqa: E501
119 | "abfahrten": "Abfahrten", # noqa: E501
120 | "sonderinformationen": "Sonderinformationen", # noqa: E501
121 | }
122 |
123 | read_only_vars = {}
124 |
125 | _composed_schemas = {}
126 |
127 | @classmethod
128 | @convert_js_args_to_python_args
129 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
130 | """AbfahrtenAPIResponse - a model defined in OpenAPI
131 |
132 | Keyword Args:
133 | _check_type (bool): if True, values for parameters in openapi_types
134 | will be type checked and a TypeError will be
135 | raised if the wrong type is input.
136 | Defaults to True
137 | _path_to_item (tuple/list): This is a list of keys or values to
138 | drill down to the model in received_data
139 | when deserializing a response
140 | _spec_property_naming (bool): True if the variable names in the input data
141 | are serialized names, as specified in the OpenAPI document.
142 | False if the variable names in the input data
143 | are pythonic names, e.g. snake case (default)
144 | _configuration (Configuration): the instance to use when
145 | deserializing a file_type parameter.
146 | If passed, type conversion is attempted
147 | If omitted no type conversion is done.
148 | _visited_composed_classes (tuple): This stores a tuple of
149 | classes that we have traveled through so that
150 | if we see that class again we will not use its
151 | discriminator again.
152 | When traveling through a discriminator, the
153 | composed schema that is
154 | is traveled through is added to this set.
155 | For example if Animal has a discriminator
156 | petType and we pass in "Dog", and the class Dog
157 | allOf includes Animal, we move through Animal
158 | once using the discriminator, and pick Dog.
159 | Then in Dog, we will make an instance of the
160 | Animal class but this time we won't travel
161 | through its discriminator because we passed in
162 | _visited_composed_classes = (Animal,)
163 | metadata (Metadata): [optional] # noqa: E501
164 | haltestellenname (str): [optional] # noqa: E501
165 | vag_kennung (str): [optional] # noqa: E501
166 | vgn_kennung (int): [optional] # noqa: E501
167 | abfahrten ([AbfahrtDto]): [optional] # noqa: E501
168 | sonderinformationen ([str]): [optional] # noqa: E501
169 | """
170 |
171 | _check_type = kwargs.pop("_check_type", True)
172 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
173 | _path_to_item = kwargs.pop("_path_to_item", ())
174 | _configuration = kwargs.pop("_configuration", None)
175 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
176 |
177 | self = super(OpenApiModel, cls).__new__(cls)
178 |
179 | if args:
180 | for arg in args:
181 | if isinstance(arg, dict):
182 | kwargs.update(arg)
183 | else:
184 | raise ApiTypeError(
185 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
186 | % (
187 | args,
188 | self.__class__.__name__,
189 | ),
190 | path_to_item=_path_to_item,
191 | valid_classes=(self.__class__,),
192 | )
193 |
194 | self._data_store = {}
195 | self._check_type = _check_type
196 | self._spec_property_naming = _spec_property_naming
197 | self._path_to_item = _path_to_item
198 | self._configuration = _configuration
199 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
200 |
201 | for var_name, var_value in kwargs.items():
202 | if (
203 | var_name not in self.attribute_map
204 | and self._configuration is not None
205 | and self._configuration.discard_unknown_keys
206 | and self.additional_properties_type is None
207 | ):
208 | # discard variable.
209 | continue
210 | setattr(self, var_name, var_value)
211 | return self
212 |
213 | required_properties = set(
214 | [
215 | "_data_store",
216 | "_check_type",
217 | "_spec_property_naming",
218 | "_path_to_item",
219 | "_configuration",
220 | "_visited_composed_classes",
221 | ]
222 | )
223 |
224 | @convert_js_args_to_python_args
225 | def __init__(self, *args, **kwargs): # noqa: E501
226 | """AbfahrtenAPIResponse - a model defined in OpenAPI
227 |
228 | Keyword Args:
229 | _check_type (bool): if True, values for parameters in openapi_types
230 | will be type checked and a TypeError will be
231 | raised if the wrong type is input.
232 | Defaults to True
233 | _path_to_item (tuple/list): This is a list of keys or values to
234 | drill down to the model in received_data
235 | when deserializing a response
236 | _spec_property_naming (bool): True if the variable names in the input data
237 | are serialized names, as specified in the OpenAPI document.
238 | False if the variable names in the input data
239 | are pythonic names, e.g. snake case (default)
240 | _configuration (Configuration): the instance to use when
241 | deserializing a file_type parameter.
242 | If passed, type conversion is attempted
243 | If omitted no type conversion is done.
244 | _visited_composed_classes (tuple): This stores a tuple of
245 | classes that we have traveled through so that
246 | if we see that class again we will not use its
247 | discriminator again.
248 | When traveling through a discriminator, the
249 | composed schema that is
250 | is traveled through is added to this set.
251 | For example if Animal has a discriminator
252 | petType and we pass in "Dog", and the class Dog
253 | allOf includes Animal, we move through Animal
254 | once using the discriminator, and pick Dog.
255 | Then in Dog, we will make an instance of the
256 | Animal class but this time we won't travel
257 | through its discriminator because we passed in
258 | _visited_composed_classes = (Animal,)
259 | metadata (Metadata): [optional] # noqa: E501
260 | haltestellenname (str): [optional] # noqa: E501
261 | vag_kennung (str): [optional] # noqa: E501
262 | vgn_kennung (int): [optional] # noqa: E501
263 | abfahrten ([AbfahrtDto]): [optional] # noqa: E501
264 | sonderinformationen ([str]): [optional] # noqa: E501
265 | """
266 |
267 | _check_type = kwargs.pop("_check_type", True)
268 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
269 | _path_to_item = kwargs.pop("_path_to_item", ())
270 | _configuration = kwargs.pop("_configuration", None)
271 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
272 |
273 | if args:
274 | for arg in args:
275 | if isinstance(arg, dict):
276 | kwargs.update(arg)
277 | else:
278 | raise ApiTypeError(
279 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
280 | % (
281 | args,
282 | self.__class__.__name__,
283 | ),
284 | path_to_item=_path_to_item,
285 | valid_classes=(self.__class__,),
286 | )
287 |
288 | self._data_store = {}
289 | self._check_type = _check_type
290 | self._spec_property_naming = _spec_property_naming
291 | self._path_to_item = _path_to_item
292 | self._configuration = _configuration
293 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
294 |
295 | for var_name, var_value in kwargs.items():
296 | if (
297 | var_name not in self.attribute_map
298 | and self._configuration is not None
299 | and self._configuration.discard_unknown_keys
300 | and self.additional_properties_type is None
301 | ):
302 | # discard variable.
303 | continue
304 | setattr(self, var_name, var_value)
305 | if var_name in self.read_only_vars:
306 | raise ApiAttributeError(
307 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
308 | f"class with read only attributes."
309 | )
310 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/fahrt_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | class FahrtDto(ModelNormal):
34 | """NOTE: This class is auto generated by OpenAPI Generator.
35 | Ref: https://openapi-generator.tech
36 |
37 | Do not edit the class manually.
38 |
39 | Attributes:
40 | allowed_values (dict): The key is the tuple path to the attribute
41 | and the for var_name this is (var_name,). The value is a dict
42 | with a capitalized key describing the allowed value and an allowed
43 | value. These dicts store the allowed enum values.
44 | attribute_map (dict): The key is attribute name
45 | and the value is json key in definition.
46 | discriminator_value_class_map (dict): A dict to go from the discriminator
47 | variable value to the discriminator class name.
48 | validations (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | that stores validations for max_length, min_length, max_items,
51 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52 | inclusive_minimum, and regex.
53 | additional_properties_type (tuple): A tuple of classes accepted
54 | as additional properties values.
55 | """
56 |
57 | allowed_values = {}
58 |
59 | validations = {}
60 |
61 | @cached_property
62 | def additional_properties_type():
63 | """
64 | This must be a method because a model may have properties that are
65 | of type self, this must run after the class is loaded
66 | """
67 | return (
68 | bool,
69 | date,
70 | datetime,
71 | dict,
72 | float,
73 | int,
74 | list,
75 | str,
76 | none_type,
77 | ) # noqa: E501
78 |
79 | _nullable = False
80 |
81 | @cached_property
82 | def openapi_types():
83 | """
84 | This must be a method because a model may have properties that are
85 | of type self, this must run after the class is loaded
86 |
87 | Returns
88 | openapi_types (dict): The key is attribute name
89 | and the value is attribute type.
90 | """
91 | return {
92 | "fahrtnummer": (int,), # noqa: E501
93 | "linienname": (str,), # noqa: E501
94 | "richtung": (str,), # noqa: E501
95 | "betriebstag": (str,), # noqa: E501
96 | "startzeit": (str,), # noqa: E501
97 | "endzeit": (str,), # noqa: E501
98 | "start_halt_id": (str,), # noqa: E501
99 | "end_halt_id": (str,), # noqa: E501
100 | "faellt_aus": (bool,), # noqa: E501
101 | "zusatzfahrt": (bool,), # noqa: E501
102 | "fahrzeugnummer": (str,), # noqa: E501
103 | }
104 |
105 | @cached_property
106 | def discriminator():
107 | return None
108 |
109 | attribute_map = {
110 | "fahrtnummer": "Fahrtnummer", # noqa: E501
111 | "linienname": "Linienname", # noqa: E501
112 | "richtung": "Richtung", # noqa: E501
113 | "betriebstag": "Betriebstag", # noqa: E501
114 | "startzeit": "Startzeit", # noqa: E501
115 | "endzeit": "Endzeit", # noqa: E501
116 | "start_halt_id": "StartHaltID", # noqa: E501
117 | "end_halt_id": "EndHaltID", # noqa: E501
118 | "faellt_aus": "FaelltAus", # noqa: E501
119 | "zusatzfahrt": "Zusatzfahrt", # noqa: E501
120 | "fahrzeugnummer": "Fahrzeugnummer", # noqa: E501
121 | }
122 |
123 | read_only_vars = {}
124 |
125 | _composed_schemas = {}
126 |
127 | @classmethod
128 | @convert_js_args_to_python_args
129 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
130 | """FahrtDto - a model defined in OpenAPI
131 |
132 | Keyword Args:
133 | _check_type (bool): if True, values for parameters in openapi_types
134 | will be type checked and a TypeError will be
135 | raised if the wrong type is input.
136 | Defaults to True
137 | _path_to_item (tuple/list): This is a list of keys or values to
138 | drill down to the model in received_data
139 | when deserializing a response
140 | _spec_property_naming (bool): True if the variable names in the input data
141 | are serialized names, as specified in the OpenAPI document.
142 | False if the variable names in the input data
143 | are pythonic names, e.g. snake case (default)
144 | _configuration (Configuration): the instance to use when
145 | deserializing a file_type parameter.
146 | If passed, type conversion is attempted
147 | If omitted no type conversion is done.
148 | _visited_composed_classes (tuple): This stores a tuple of
149 | classes that we have traveled through so that
150 | if we see that class again we will not use its
151 | discriminator again.
152 | When traveling through a discriminator, the
153 | composed schema that is
154 | is traveled through is added to this set.
155 | For example if Animal has a discriminator
156 | petType and we pass in "Dog", and the class Dog
157 | allOf includes Animal, we move through Animal
158 | once using the discriminator, and pick Dog.
159 | Then in Dog, we will make an instance of the
160 | Animal class but this time we won't travel
161 | through its discriminator because we passed in
162 | _visited_composed_classes = (Animal,)
163 | fahrtnummer (int): [optional] # noqa: E501
164 | linienname (str): [optional] # noqa: E501
165 | richtung (str): [optional] # noqa: E501
166 | betriebstag (str): [optional] # noqa: E501
167 | startzeit (str): [optional] # noqa: E501
168 | endzeit (str): [optional] # noqa: E501
169 | start_halt_id (str): [optional] # noqa: E501
170 | end_halt_id (str): [optional] # noqa: E501
171 | faellt_aus (bool): [optional] # noqa: E501
172 | zusatzfahrt (bool): [optional] # noqa: E501
173 | fahrzeugnummer (str): [optional] # noqa: E501
174 | """
175 |
176 | _check_type = kwargs.pop("_check_type", True)
177 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
178 | _path_to_item = kwargs.pop("_path_to_item", ())
179 | _configuration = kwargs.pop("_configuration", None)
180 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
181 |
182 | self = super(OpenApiModel, cls).__new__(cls)
183 |
184 | if args:
185 | for arg in args:
186 | if isinstance(arg, dict):
187 | kwargs.update(arg)
188 | else:
189 | raise ApiTypeError(
190 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
191 | % (
192 | args,
193 | self.__class__.__name__,
194 | ),
195 | path_to_item=_path_to_item,
196 | valid_classes=(self.__class__,),
197 | )
198 |
199 | self._data_store = {}
200 | self._check_type = _check_type
201 | self._spec_property_naming = _spec_property_naming
202 | self._path_to_item = _path_to_item
203 | self._configuration = _configuration
204 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
205 |
206 | for var_name, var_value in kwargs.items():
207 | if (
208 | var_name not in self.attribute_map
209 | and self._configuration is not None
210 | and self._configuration.discard_unknown_keys
211 | and self.additional_properties_type is None
212 | ):
213 | # discard variable.
214 | continue
215 | setattr(self, var_name, var_value)
216 | return self
217 |
218 | required_properties = set(
219 | [
220 | "_data_store",
221 | "_check_type",
222 | "_spec_property_naming",
223 | "_path_to_item",
224 | "_configuration",
225 | "_visited_composed_classes",
226 | ]
227 | )
228 |
229 | @convert_js_args_to_python_args
230 | def __init__(self, *args, **kwargs): # noqa: E501
231 | """FahrtDto - a model defined in OpenAPI
232 |
233 | Keyword Args:
234 | _check_type (bool): if True, values for parameters in openapi_types
235 | will be type checked and a TypeError will be
236 | raised if the wrong type is input.
237 | Defaults to True
238 | _path_to_item (tuple/list): This is a list of keys or values to
239 | drill down to the model in received_data
240 | when deserializing a response
241 | _spec_property_naming (bool): True if the variable names in the input data
242 | are serialized names, as specified in the OpenAPI document.
243 | False if the variable names in the input data
244 | are pythonic names, e.g. snake case (default)
245 | _configuration (Configuration): the instance to use when
246 | deserializing a file_type parameter.
247 | If passed, type conversion is attempted
248 | If omitted no type conversion is done.
249 | _visited_composed_classes (tuple): This stores a tuple of
250 | classes that we have traveled through so that
251 | if we see that class again we will not use its
252 | discriminator again.
253 | When traveling through a discriminator, the
254 | composed schema that is
255 | is traveled through is added to this set.
256 | For example if Animal has a discriminator
257 | petType and we pass in "Dog", and the class Dog
258 | allOf includes Animal, we move through Animal
259 | once using the discriminator, and pick Dog.
260 | Then in Dog, we will make an instance of the
261 | Animal class but this time we won't travel
262 | through its discriminator because we passed in
263 | _visited_composed_classes = (Animal,)
264 | fahrtnummer (int): [optional] # noqa: E501
265 | linienname (str): [optional] # noqa: E501
266 | richtung (str): [optional] # noqa: E501
267 | betriebstag (str): [optional] # noqa: E501
268 | startzeit (str): [optional] # noqa: E501
269 | endzeit (str): [optional] # noqa: E501
270 | start_halt_id (str): [optional] # noqa: E501
271 | end_halt_id (str): [optional] # noqa: E501
272 | faellt_aus (bool): [optional] # noqa: E501
273 | zusatzfahrt (bool): [optional] # noqa: E501
274 | fahrzeugnummer (str): [optional] # noqa: E501
275 | """
276 |
277 | _check_type = kwargs.pop("_check_type", True)
278 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
279 | _path_to_item = kwargs.pop("_path_to_item", ())
280 | _configuration = kwargs.pop("_configuration", None)
281 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
282 |
283 | if args:
284 | for arg in args:
285 | if isinstance(arg, dict):
286 | kwargs.update(arg)
287 | else:
288 | raise ApiTypeError(
289 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
290 | % (
291 | args,
292 | self.__class__.__name__,
293 | ),
294 | path_to_item=_path_to_item,
295 | valid_classes=(self.__class__,),
296 | )
297 |
298 | self._data_store = {}
299 | self._check_type = _check_type
300 | self._spec_property_naming = _spec_property_naming
301 | self._path_to_item = _path_to_item
302 | self._configuration = _configuration
303 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
304 |
305 | for var_name, var_value in kwargs.items():
306 | if (
307 | var_name not in self.attribute_map
308 | and self._configuration is not None
309 | and self._configuration.discard_unknown_keys
310 | and self.additional_properties_type is None
311 | ):
312 | # discard variable.
313 | continue
314 | setattr(self, var_name, var_value)
315 | if var_name in self.read_only_vars:
316 | raise ApiAttributeError(
317 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
318 | f"class with read only attributes."
319 | )
320 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/fahrten_api_response.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.vag.model.fahrt_dto import FahrtDto
35 | from deutschland.vag.model.fahrweg_halteposition_dto import FahrwegHaltepositionDto
36 | from deutschland.vag.model.metadata import Metadata
37 |
38 | globals()["FahrtDto"] = FahrtDto
39 | globals()["FahrwegHaltepositionDto"] = FahrwegHaltepositionDto
40 | globals()["Metadata"] = Metadata
41 |
42 |
43 | class FahrtenAPIResponse(ModelNormal):
44 | """NOTE: This class is auto generated by OpenAPI Generator.
45 | Ref: https://openapi-generator.tech
46 |
47 | Do not edit the class manually.
48 |
49 | Attributes:
50 | allowed_values (dict): The key is the tuple path to the attribute
51 | and the for var_name this is (var_name,). The value is a dict
52 | with a capitalized key describing the allowed value and an allowed
53 | value. These dicts store the allowed enum values.
54 | attribute_map (dict): The key is attribute name
55 | and the value is json key in definition.
56 | discriminator_value_class_map (dict): A dict to go from the discriminator
57 | variable value to the discriminator class name.
58 | validations (dict): The key is the tuple path to the attribute
59 | and the for var_name this is (var_name,). The value is a dict
60 | that stores validations for max_length, min_length, max_items,
61 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
62 | inclusive_minimum, and regex.
63 | additional_properties_type (tuple): A tuple of classes accepted
64 | as additional properties values.
65 | """
66 |
67 | allowed_values = {}
68 |
69 | validations = {}
70 |
71 | @cached_property
72 | def additional_properties_type():
73 | """
74 | This must be a method because a model may have properties that are
75 | of type self, this must run after the class is loaded
76 | """
77 | lazy_import()
78 | return (
79 | bool,
80 | date,
81 | datetime,
82 | dict,
83 | float,
84 | int,
85 | list,
86 | str,
87 | none_type,
88 | ) # noqa: E501
89 |
90 | _nullable = False
91 |
92 | @cached_property
93 | def openapi_types():
94 | """
95 | This must be a method because a model may have properties that are
96 | of type self, this must run after the class is loaded
97 |
98 | Returns
99 | openapi_types (dict): The key is attribute name
100 | and the value is attribute type.
101 | """
102 | lazy_import()
103 | return {
104 | "metadata": (Metadata,), # noqa: E501
105 | "linienname": (str,), # noqa: E501
106 | "richtung": (str,), # noqa: E501
107 | "richtungstext": (str,), # noqa: E501
108 | "fahrtnummer": (int,), # noqa: E501
109 | "betriebstag": (str,), # noqa: E501
110 | "produkt": (str,), # noqa: E501
111 | "faellt_aus": (bool,), # noqa: E501
112 | "zusatzfahrt": (bool,), # noqa: E501
113 | "fahrzeugnummer": (str,), # noqa: E501
114 | "fahrtverlauf": ([FahrwegHaltepositionDto],), # noqa: E501
115 | "fahrten": ([FahrtDto],), # noqa: E501
116 | }
117 |
118 | @cached_property
119 | def discriminator():
120 | return None
121 |
122 | attribute_map = {
123 | "metadata": "Metadata", # noqa: E501
124 | "linienname": "Linienname", # noqa: E501
125 | "richtung": "Richtung", # noqa: E501
126 | "richtungstext": "Richtungstext", # noqa: E501
127 | "fahrtnummer": "Fahrtnummer", # noqa: E501
128 | "betriebstag": "Betriebstag", # noqa: E501
129 | "produkt": "Produkt", # noqa: E501
130 | "faellt_aus": "FaelltAus", # noqa: E501
131 | "zusatzfahrt": "Zusatzfahrt", # noqa: E501
132 | "fahrzeugnummer": "Fahrzeugnummer", # noqa: E501
133 | "fahrtverlauf": "Fahrtverlauf", # noqa: E501
134 | "fahrten": "Fahrten", # noqa: E501
135 | }
136 |
137 | read_only_vars = {}
138 |
139 | _composed_schemas = {}
140 |
141 | @classmethod
142 | @convert_js_args_to_python_args
143 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
144 | """FahrtenAPIResponse - a model defined in OpenAPI
145 |
146 | Keyword Args:
147 | _check_type (bool): if True, values for parameters in openapi_types
148 | will be type checked and a TypeError will be
149 | raised if the wrong type is input.
150 | Defaults to True
151 | _path_to_item (tuple/list): This is a list of keys or values to
152 | drill down to the model in received_data
153 | when deserializing a response
154 | _spec_property_naming (bool): True if the variable names in the input data
155 | are serialized names, as specified in the OpenAPI document.
156 | False if the variable names in the input data
157 | are pythonic names, e.g. snake case (default)
158 | _configuration (Configuration): the instance to use when
159 | deserializing a file_type parameter.
160 | If passed, type conversion is attempted
161 | If omitted no type conversion is done.
162 | _visited_composed_classes (tuple): This stores a tuple of
163 | classes that we have traveled through so that
164 | if we see that class again we will not use its
165 | discriminator again.
166 | When traveling through a discriminator, the
167 | composed schema that is
168 | is traveled through is added to this set.
169 | For example if Animal has a discriminator
170 | petType and we pass in "Dog", and the class Dog
171 | allOf includes Animal, we move through Animal
172 | once using the discriminator, and pick Dog.
173 | Then in Dog, we will make an instance of the
174 | Animal class but this time we won't travel
175 | through its discriminator because we passed in
176 | _visited_composed_classes = (Animal,)
177 | metadata (Metadata): [optional] # noqa: E501
178 | linienname (str): [optional] # noqa: E501
179 | richtung (str): [optional] # noqa: E501
180 | richtungstext (str): [optional] # noqa: E501
181 | fahrtnummer (int): [optional] # noqa: E501
182 | betriebstag (str): [optional] # noqa: E501
183 | produkt (str): [optional] # noqa: E501
184 | faellt_aus (bool): [optional] # noqa: E501
185 | zusatzfahrt (bool): [optional] # noqa: E501
186 | fahrzeugnummer (str): [optional] # noqa: E501
187 | fahrtverlauf ([FahrwegHaltepositionDto]): [optional] # noqa: E501
188 | fahrten ([FahrtDto]): [optional] # noqa: E501
189 | """
190 |
191 | _check_type = kwargs.pop("_check_type", True)
192 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
193 | _path_to_item = kwargs.pop("_path_to_item", ())
194 | _configuration = kwargs.pop("_configuration", None)
195 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
196 |
197 | self = super(OpenApiModel, cls).__new__(cls)
198 |
199 | if args:
200 | for arg in args:
201 | if isinstance(arg, dict):
202 | kwargs.update(arg)
203 | else:
204 | raise ApiTypeError(
205 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
206 | % (
207 | args,
208 | self.__class__.__name__,
209 | ),
210 | path_to_item=_path_to_item,
211 | valid_classes=(self.__class__,),
212 | )
213 |
214 | self._data_store = {}
215 | self._check_type = _check_type
216 | self._spec_property_naming = _spec_property_naming
217 | self._path_to_item = _path_to_item
218 | self._configuration = _configuration
219 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
220 |
221 | for var_name, var_value in kwargs.items():
222 | if (
223 | var_name not in self.attribute_map
224 | and self._configuration is not None
225 | and self._configuration.discard_unknown_keys
226 | and self.additional_properties_type is None
227 | ):
228 | # discard variable.
229 | continue
230 | setattr(self, var_name, var_value)
231 | return self
232 |
233 | required_properties = set(
234 | [
235 | "_data_store",
236 | "_check_type",
237 | "_spec_property_naming",
238 | "_path_to_item",
239 | "_configuration",
240 | "_visited_composed_classes",
241 | ]
242 | )
243 |
244 | @convert_js_args_to_python_args
245 | def __init__(self, *args, **kwargs): # noqa: E501
246 | """FahrtenAPIResponse - a model defined in OpenAPI
247 |
248 | Keyword Args:
249 | _check_type (bool): if True, values for parameters in openapi_types
250 | will be type checked and a TypeError will be
251 | raised if the wrong type is input.
252 | Defaults to True
253 | _path_to_item (tuple/list): This is a list of keys or values to
254 | drill down to the model in received_data
255 | when deserializing a response
256 | _spec_property_naming (bool): True if the variable names in the input data
257 | are serialized names, as specified in the OpenAPI document.
258 | False if the variable names in the input data
259 | are pythonic names, e.g. snake case (default)
260 | _configuration (Configuration): the instance to use when
261 | deserializing a file_type parameter.
262 | If passed, type conversion is attempted
263 | If omitted no type conversion is done.
264 | _visited_composed_classes (tuple): This stores a tuple of
265 | classes that we have traveled through so that
266 | if we see that class again we will not use its
267 | discriminator again.
268 | When traveling through a discriminator, the
269 | composed schema that is
270 | is traveled through is added to this set.
271 | For example if Animal has a discriminator
272 | petType and we pass in "Dog", and the class Dog
273 | allOf includes Animal, we move through Animal
274 | once using the discriminator, and pick Dog.
275 | Then in Dog, we will make an instance of the
276 | Animal class but this time we won't travel
277 | through its discriminator because we passed in
278 | _visited_composed_classes = (Animal,)
279 | metadata (Metadata): [optional] # noqa: E501
280 | linienname (str): [optional] # noqa: E501
281 | richtung (str): [optional] # noqa: E501
282 | richtungstext (str): [optional] # noqa: E501
283 | fahrtnummer (int): [optional] # noqa: E501
284 | betriebstag (str): [optional] # noqa: E501
285 | produkt (str): [optional] # noqa: E501
286 | faellt_aus (bool): [optional] # noqa: E501
287 | zusatzfahrt (bool): [optional] # noqa: E501
288 | fahrzeugnummer (str): [optional] # noqa: E501
289 | fahrtverlauf ([FahrwegHaltepositionDto]): [optional] # noqa: E501
290 | fahrten ([FahrtDto]): [optional] # noqa: E501
291 | """
292 |
293 | _check_type = kwargs.pop("_check_type", True)
294 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
295 | _path_to_item = kwargs.pop("_path_to_item", ())
296 | _configuration = kwargs.pop("_configuration", None)
297 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
298 |
299 | if args:
300 | for arg in args:
301 | if isinstance(arg, dict):
302 | kwargs.update(arg)
303 | else:
304 | raise ApiTypeError(
305 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
306 | % (
307 | args,
308 | self.__class__.__name__,
309 | ),
310 | path_to_item=_path_to_item,
311 | valid_classes=(self.__class__,),
312 | )
313 |
314 | self._data_store = {}
315 | self._check_type = _check_type
316 | self._spec_property_naming = _spec_property_naming
317 | self._path_to_item = _path_to_item
318 | self._configuration = _configuration
319 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
320 |
321 | for var_name, var_value in kwargs.items():
322 | if (
323 | var_name not in self.attribute_map
324 | and self._configuration is not None
325 | and self._configuration.discard_unknown_keys
326 | and self.additional_properties_type is None
327 | ):
328 | # discard variable.
329 | continue
330 | setattr(self, var_name, var_value)
331 | if var_name in self.read_only_vars:
332 | raise ApiAttributeError(
333 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
334 | f"class with read only attributes."
335 | )
336 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/fahrweg_halteposition_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | class FahrwegHaltepositionDto(ModelNormal):
34 | """NOTE: This class is auto generated by OpenAPI Generator.
35 | Ref: https://openapi-generator.tech
36 |
37 | Do not edit the class manually.
38 |
39 | Attributes:
40 | allowed_values (dict): The key is the tuple path to the attribute
41 | and the for var_name this is (var_name,). The value is a dict
42 | with a capitalized key describing the allowed value and an allowed
43 | value. These dicts store the allowed enum values.
44 | attribute_map (dict): The key is attribute name
45 | and the value is json key in definition.
46 | discriminator_value_class_map (dict): A dict to go from the discriminator
47 | variable value to the discriminator class name.
48 | validations (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | that stores validations for max_length, min_length, max_items,
51 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52 | inclusive_minimum, and regex.
53 | additional_properties_type (tuple): A tuple of classes accepted
54 | as additional properties values.
55 | """
56 |
57 | allowed_values = {}
58 |
59 | validations = {}
60 |
61 | @cached_property
62 | def additional_properties_type():
63 | """
64 | This must be a method because a model may have properties that are
65 | of type self, this must run after the class is loaded
66 | """
67 | return (
68 | bool,
69 | date,
70 | datetime,
71 | dict,
72 | float,
73 | int,
74 | list,
75 | str,
76 | none_type,
77 | ) # noqa: E501
78 |
79 | _nullable = False
80 |
81 | @cached_property
82 | def openapi_types():
83 | """
84 | This must be a method because a model may have properties that are
85 | of type self, this must run after the class is loaded
86 |
87 | Returns
88 | openapi_types (dict): The key is attribute name
89 | and the value is attribute type.
90 | """
91 | return {
92 | "haltestellenname": (str,), # noqa: E501
93 | "vag_kennung": (str,), # noqa: E501
94 | "vgn_kennung": (int,), # noqa: E501
95 | "haltepunkt": (str,), # noqa: E501
96 | "ankunftszeit_soll": (str,), # noqa: E501
97 | "ankunftszeit_ist": (str,), # noqa: E501
98 | "abfahrtszeit_soll": (str,), # noqa: E501
99 | "abfahrtszeit_ist": (str,), # noqa: E501
100 | "richtungstext": (str,), # noqa: E501
101 | "longitude": (float,), # noqa: E501
102 | "latitude": (float,), # noqa: E501
103 | "durchfahrt": (bool,), # noqa: E501
104 | "einsteigeverbot": (bool,), # noqa: E501
105 | "aussteigeverbot": (bool,), # noqa: E501
106 | "zusatzhalt": (bool,), # noqa: E501
107 | }
108 |
109 | @cached_property
110 | def discriminator():
111 | return None
112 |
113 | attribute_map = {
114 | "haltestellenname": "Haltestellenname", # noqa: E501
115 | "vag_kennung": "VAGKennung", # noqa: E501
116 | "vgn_kennung": "VGNKennung", # noqa: E501
117 | "haltepunkt": "Haltepunkt", # noqa: E501
118 | "ankunftszeit_soll": "AnkunftszeitSoll", # noqa: E501
119 | "ankunftszeit_ist": "AnkunftszeitIst", # noqa: E501
120 | "abfahrtszeit_soll": "AbfahrtszeitSoll", # noqa: E501
121 | "abfahrtszeit_ist": "AbfahrtszeitIst", # noqa: E501
122 | "richtungstext": "Richtungstext", # noqa: E501
123 | "longitude": "Longitude", # noqa: E501
124 | "latitude": "Latitude", # noqa: E501
125 | "durchfahrt": "Durchfahrt", # noqa: E501
126 | "einsteigeverbot": "Einsteigeverbot", # noqa: E501
127 | "aussteigeverbot": "Aussteigeverbot", # noqa: E501
128 | "zusatzhalt": "Zusatzhalt", # noqa: E501
129 | }
130 |
131 | read_only_vars = {}
132 |
133 | _composed_schemas = {}
134 |
135 | @classmethod
136 | @convert_js_args_to_python_args
137 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
138 | """FahrwegHaltepositionDto - a model defined in OpenAPI
139 |
140 | Keyword Args:
141 | _check_type (bool): if True, values for parameters in openapi_types
142 | will be type checked and a TypeError will be
143 | raised if the wrong type is input.
144 | Defaults to True
145 | _path_to_item (tuple/list): This is a list of keys or values to
146 | drill down to the model in received_data
147 | when deserializing a response
148 | _spec_property_naming (bool): True if the variable names in the input data
149 | are serialized names, as specified in the OpenAPI document.
150 | False if the variable names in the input data
151 | are pythonic names, e.g. snake case (default)
152 | _configuration (Configuration): the instance to use when
153 | deserializing a file_type parameter.
154 | If passed, type conversion is attempted
155 | If omitted no type conversion is done.
156 | _visited_composed_classes (tuple): This stores a tuple of
157 | classes that we have traveled through so that
158 | if we see that class again we will not use its
159 | discriminator again.
160 | When traveling through a discriminator, the
161 | composed schema that is
162 | is traveled through is added to this set.
163 | For example if Animal has a discriminator
164 | petType and we pass in "Dog", and the class Dog
165 | allOf includes Animal, we move through Animal
166 | once using the discriminator, and pick Dog.
167 | Then in Dog, we will make an instance of the
168 | Animal class but this time we won't travel
169 | through its discriminator because we passed in
170 | _visited_composed_classes = (Animal,)
171 | haltestellenname (str): [optional] # noqa: E501
172 | vag_kennung (str): [optional] # noqa: E501
173 | vgn_kennung (int): [optional] # noqa: E501
174 | haltepunkt (str): [optional] # noqa: E501
175 | ankunftszeit_soll (str): [optional] # noqa: E501
176 | ankunftszeit_ist (str): [optional] # noqa: E501
177 | abfahrtszeit_soll (str): [optional] # noqa: E501
178 | abfahrtszeit_ist (str): [optional] # noqa: E501
179 | richtungstext (str): [optional] # noqa: E501
180 | longitude (float): [optional] # noqa: E501
181 | latitude (float): [optional] # noqa: E501
182 | durchfahrt (bool): [optional] # noqa: E501
183 | einsteigeverbot (bool): [optional] # noqa: E501
184 | aussteigeverbot (bool): [optional] # noqa: E501
185 | zusatzhalt (bool): [optional] # noqa: E501
186 | """
187 |
188 | _check_type = kwargs.pop("_check_type", True)
189 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
190 | _path_to_item = kwargs.pop("_path_to_item", ())
191 | _configuration = kwargs.pop("_configuration", None)
192 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
193 |
194 | self = super(OpenApiModel, cls).__new__(cls)
195 |
196 | if args:
197 | for arg in args:
198 | if isinstance(arg, dict):
199 | kwargs.update(arg)
200 | else:
201 | raise ApiTypeError(
202 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
203 | % (
204 | args,
205 | self.__class__.__name__,
206 | ),
207 | path_to_item=_path_to_item,
208 | valid_classes=(self.__class__,),
209 | )
210 |
211 | self._data_store = {}
212 | self._check_type = _check_type
213 | self._spec_property_naming = _spec_property_naming
214 | self._path_to_item = _path_to_item
215 | self._configuration = _configuration
216 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
217 |
218 | for var_name, var_value in kwargs.items():
219 | if (
220 | var_name not in self.attribute_map
221 | and self._configuration is not None
222 | and self._configuration.discard_unknown_keys
223 | and self.additional_properties_type is None
224 | ):
225 | # discard variable.
226 | continue
227 | setattr(self, var_name, var_value)
228 | return self
229 |
230 | required_properties = set(
231 | [
232 | "_data_store",
233 | "_check_type",
234 | "_spec_property_naming",
235 | "_path_to_item",
236 | "_configuration",
237 | "_visited_composed_classes",
238 | ]
239 | )
240 |
241 | @convert_js_args_to_python_args
242 | def __init__(self, *args, **kwargs): # noqa: E501
243 | """FahrwegHaltepositionDto - a model defined in OpenAPI
244 |
245 | Keyword Args:
246 | _check_type (bool): if True, values for parameters in openapi_types
247 | will be type checked and a TypeError will be
248 | raised if the wrong type is input.
249 | Defaults to True
250 | _path_to_item (tuple/list): This is a list of keys or values to
251 | drill down to the model in received_data
252 | when deserializing a response
253 | _spec_property_naming (bool): True if the variable names in the input data
254 | are serialized names, as specified in the OpenAPI document.
255 | False if the variable names in the input data
256 | are pythonic names, e.g. snake case (default)
257 | _configuration (Configuration): the instance to use when
258 | deserializing a file_type parameter.
259 | If passed, type conversion is attempted
260 | If omitted no type conversion is done.
261 | _visited_composed_classes (tuple): This stores a tuple of
262 | classes that we have traveled through so that
263 | if we see that class again we will not use its
264 | discriminator again.
265 | When traveling through a discriminator, the
266 | composed schema that is
267 | is traveled through is added to this set.
268 | For example if Animal has a discriminator
269 | petType and we pass in "Dog", and the class Dog
270 | allOf includes Animal, we move through Animal
271 | once using the discriminator, and pick Dog.
272 | Then in Dog, we will make an instance of the
273 | Animal class but this time we won't travel
274 | through its discriminator because we passed in
275 | _visited_composed_classes = (Animal,)
276 | haltestellenname (str): [optional] # noqa: E501
277 | vag_kennung (str): [optional] # noqa: E501
278 | vgn_kennung (int): [optional] # noqa: E501
279 | haltepunkt (str): [optional] # noqa: E501
280 | ankunftszeit_soll (str): [optional] # noqa: E501
281 | ankunftszeit_ist (str): [optional] # noqa: E501
282 | abfahrtszeit_soll (str): [optional] # noqa: E501
283 | abfahrtszeit_ist (str): [optional] # noqa: E501
284 | richtungstext (str): [optional] # noqa: E501
285 | longitude (float): [optional] # noqa: E501
286 | latitude (float): [optional] # noqa: E501
287 | durchfahrt (bool): [optional] # noqa: E501
288 | einsteigeverbot (bool): [optional] # noqa: E501
289 | aussteigeverbot (bool): [optional] # noqa: E501
290 | zusatzhalt (bool): [optional] # noqa: E501
291 | """
292 |
293 | _check_type = kwargs.pop("_check_type", True)
294 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
295 | _path_to_item = kwargs.pop("_path_to_item", ())
296 | _configuration = kwargs.pop("_configuration", None)
297 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
298 |
299 | if args:
300 | for arg in args:
301 | if isinstance(arg, dict):
302 | kwargs.update(arg)
303 | else:
304 | raise ApiTypeError(
305 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
306 | % (
307 | args,
308 | self.__class__.__name__,
309 | ),
310 | path_to_item=_path_to_item,
311 | valid_classes=(self.__class__,),
312 | )
313 |
314 | self._data_store = {}
315 | self._check_type = _check_type
316 | self._spec_property_naming = _spec_property_naming
317 | self._path_to_item = _path_to_item
318 | self._configuration = _configuration
319 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
320 |
321 | for var_name, var_value in kwargs.items():
322 | if (
323 | var_name not in self.attribute_map
324 | and self._configuration is not None
325 | and self._configuration.discard_unknown_keys
326 | and self.additional_properties_type is None
327 | ):
328 | # discard variable.
329 | continue
330 | setattr(self, var_name, var_value)
331 | if var_name in self.read_only_vars:
332 | raise ApiAttributeError(
333 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
334 | f"class with read only attributes."
335 | )
336 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/haltestelle_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | class HaltestelleDto(ModelNormal):
34 | """NOTE: This class is auto generated by OpenAPI Generator.
35 | Ref: https://openapi-generator.tech
36 |
37 | Do not edit the class manually.
38 |
39 | Attributes:
40 | allowed_values (dict): The key is the tuple path to the attribute
41 | and the for var_name this is (var_name,). The value is a dict
42 | with a capitalized key describing the allowed value and an allowed
43 | value. These dicts store the allowed enum values.
44 | attribute_map (dict): The key is attribute name
45 | and the value is json key in definition.
46 | discriminator_value_class_map (dict): A dict to go from the discriminator
47 | variable value to the discriminator class name.
48 | validations (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | that stores validations for max_length, min_length, max_items,
51 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52 | inclusive_minimum, and regex.
53 | additional_properties_type (tuple): A tuple of classes accepted
54 | as additional properties values.
55 | """
56 |
57 | allowed_values = {}
58 |
59 | validations = {}
60 |
61 | @cached_property
62 | def additional_properties_type():
63 | """
64 | This must be a method because a model may have properties that are
65 | of type self, this must run after the class is loaded
66 | """
67 | return (
68 | bool,
69 | date,
70 | datetime,
71 | dict,
72 | float,
73 | int,
74 | list,
75 | str,
76 | none_type,
77 | ) # noqa: E501
78 |
79 | _nullable = False
80 |
81 | @cached_property
82 | def openapi_types():
83 | """
84 | This must be a method because a model may have properties that are
85 | of type self, this must run after the class is loaded
86 |
87 | Returns
88 | openapi_types (dict): The key is attribute name
89 | and the value is attribute type.
90 | """
91 | return {
92 | "haltestellenname": (str,), # noqa: E501
93 | "vag_kennung": (str,), # noqa: E501
94 | "vgn_kennung": (int,), # noqa: E501
95 | "longitude": (float,), # noqa: E501
96 | "latitude": (float,), # noqa: E501
97 | "produkte": (str,), # noqa: E501
98 | }
99 |
100 | @cached_property
101 | def discriminator():
102 | return None
103 |
104 | attribute_map = {
105 | "haltestellenname": "Haltestellenname", # noqa: E501
106 | "vag_kennung": "VAGKennung", # noqa: E501
107 | "vgn_kennung": "VGNKennung", # noqa: E501
108 | "longitude": "Longitude", # noqa: E501
109 | "latitude": "Latitude", # noqa: E501
110 | "produkte": "Produkte", # noqa: E501
111 | }
112 |
113 | read_only_vars = {}
114 |
115 | _composed_schemas = {}
116 |
117 | @classmethod
118 | @convert_js_args_to_python_args
119 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
120 | """HaltestelleDto - a model defined in OpenAPI
121 |
122 | Keyword Args:
123 | _check_type (bool): if True, values for parameters in openapi_types
124 | will be type checked and a TypeError will be
125 | raised if the wrong type is input.
126 | Defaults to True
127 | _path_to_item (tuple/list): This is a list of keys or values to
128 | drill down to the model in received_data
129 | when deserializing a response
130 | _spec_property_naming (bool): True if the variable names in the input data
131 | are serialized names, as specified in the OpenAPI document.
132 | False if the variable names in the input data
133 | are pythonic names, e.g. snake case (default)
134 | _configuration (Configuration): the instance to use when
135 | deserializing a file_type parameter.
136 | If passed, type conversion is attempted
137 | If omitted no type conversion is done.
138 | _visited_composed_classes (tuple): This stores a tuple of
139 | classes that we have traveled through so that
140 | if we see that class again we will not use its
141 | discriminator again.
142 | When traveling through a discriminator, the
143 | composed schema that is
144 | is traveled through is added to this set.
145 | For example if Animal has a discriminator
146 | petType and we pass in "Dog", and the class Dog
147 | allOf includes Animal, we move through Animal
148 | once using the discriminator, and pick Dog.
149 | Then in Dog, we will make an instance of the
150 | Animal class but this time we won't travel
151 | through its discriminator because we passed in
152 | _visited_composed_classes = (Animal,)
153 | haltestellenname (str): [optional] # noqa: E501
154 | vag_kennung (str): [optional] # noqa: E501
155 | vgn_kennung (int): [optional] # noqa: E501
156 | longitude (float): [optional] # noqa: E501
157 | latitude (float): [optional] # noqa: E501
158 | produkte (str): [optional] # noqa: E501
159 | """
160 |
161 | _check_type = kwargs.pop("_check_type", True)
162 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
163 | _path_to_item = kwargs.pop("_path_to_item", ())
164 | _configuration = kwargs.pop("_configuration", None)
165 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
166 |
167 | self = super(OpenApiModel, cls).__new__(cls)
168 |
169 | if args:
170 | for arg in args:
171 | if isinstance(arg, dict):
172 | kwargs.update(arg)
173 | else:
174 | raise ApiTypeError(
175 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
176 | % (
177 | args,
178 | self.__class__.__name__,
179 | ),
180 | path_to_item=_path_to_item,
181 | valid_classes=(self.__class__,),
182 | )
183 |
184 | self._data_store = {}
185 | self._check_type = _check_type
186 | self._spec_property_naming = _spec_property_naming
187 | self._path_to_item = _path_to_item
188 | self._configuration = _configuration
189 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
190 |
191 | for var_name, var_value in kwargs.items():
192 | if (
193 | var_name not in self.attribute_map
194 | and self._configuration is not None
195 | and self._configuration.discard_unknown_keys
196 | and self.additional_properties_type is None
197 | ):
198 | # discard variable.
199 | continue
200 | setattr(self, var_name, var_value)
201 | return self
202 |
203 | required_properties = set(
204 | [
205 | "_data_store",
206 | "_check_type",
207 | "_spec_property_naming",
208 | "_path_to_item",
209 | "_configuration",
210 | "_visited_composed_classes",
211 | ]
212 | )
213 |
214 | @convert_js_args_to_python_args
215 | def __init__(self, *args, **kwargs): # noqa: E501
216 | """HaltestelleDto - a model defined in OpenAPI
217 |
218 | Keyword Args:
219 | _check_type (bool): if True, values for parameters in openapi_types
220 | will be type checked and a TypeError will be
221 | raised if the wrong type is input.
222 | Defaults to True
223 | _path_to_item (tuple/list): This is a list of keys or values to
224 | drill down to the model in received_data
225 | when deserializing a response
226 | _spec_property_naming (bool): True if the variable names in the input data
227 | are serialized names, as specified in the OpenAPI document.
228 | False if the variable names in the input data
229 | are pythonic names, e.g. snake case (default)
230 | _configuration (Configuration): the instance to use when
231 | deserializing a file_type parameter.
232 | If passed, type conversion is attempted
233 | If omitted no type conversion is done.
234 | _visited_composed_classes (tuple): This stores a tuple of
235 | classes that we have traveled through so that
236 | if we see that class again we will not use its
237 | discriminator again.
238 | When traveling through a discriminator, the
239 | composed schema that is
240 | is traveled through is added to this set.
241 | For example if Animal has a discriminator
242 | petType and we pass in "Dog", and the class Dog
243 | allOf includes Animal, we move through Animal
244 | once using the discriminator, and pick Dog.
245 | Then in Dog, we will make an instance of the
246 | Animal class but this time we won't travel
247 | through its discriminator because we passed in
248 | _visited_composed_classes = (Animal,)
249 | haltestellenname (str): [optional] # noqa: E501
250 | vag_kennung (str): [optional] # noqa: E501
251 | vgn_kennung (int): [optional] # noqa: E501
252 | longitude (float): [optional] # noqa: E501
253 | latitude (float): [optional] # noqa: E501
254 | produkte (str): [optional] # noqa: E501
255 | """
256 |
257 | _check_type = kwargs.pop("_check_type", True)
258 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
259 | _path_to_item = kwargs.pop("_path_to_item", ())
260 | _configuration = kwargs.pop("_configuration", None)
261 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
262 |
263 | if args:
264 | for arg in args:
265 | if isinstance(arg, dict):
266 | kwargs.update(arg)
267 | else:
268 | raise ApiTypeError(
269 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
270 | % (
271 | args,
272 | self.__class__.__name__,
273 | ),
274 | path_to_item=_path_to_item,
275 | valid_classes=(self.__class__,),
276 | )
277 |
278 | self._data_store = {}
279 | self._check_type = _check_type
280 | self._spec_property_naming = _spec_property_naming
281 | self._path_to_item = _path_to_item
282 | self._configuration = _configuration
283 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
284 |
285 | for var_name, var_value in kwargs.items():
286 | if (
287 | var_name not in self.attribute_map
288 | and self._configuration is not None
289 | and self._configuration.discard_unknown_keys
290 | and self.additional_properties_type is None
291 | ):
292 | # discard variable.
293 | continue
294 | setattr(self, var_name, var_value)
295 | if var_name in self.read_only_vars:
296 | raise ApiAttributeError(
297 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
298 | f"class with read only attributes."
299 | )
300 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/haltestellen_api_response.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.vag.model.haltestelle_dto import HaltestelleDto
35 | from deutschland.vag.model.metadata import Metadata
36 |
37 | globals()["HaltestelleDto"] = HaltestelleDto
38 | globals()["Metadata"] = Metadata
39 |
40 |
41 | class HaltestellenAPIResponse(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "metadata": (Metadata,), # noqa: E501
103 | "haltestellen": ([HaltestelleDto],), # noqa: E501
104 | }
105 |
106 | @cached_property
107 | def discriminator():
108 | return None
109 |
110 | attribute_map = {
111 | "metadata": "Metadata", # noqa: E501
112 | "haltestellen": "Haltestellen", # noqa: E501
113 | }
114 |
115 | read_only_vars = {}
116 |
117 | _composed_schemas = {}
118 |
119 | @classmethod
120 | @convert_js_args_to_python_args
121 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
122 | """HaltestellenAPIResponse - a model defined in OpenAPI
123 |
124 | Keyword Args:
125 | _check_type (bool): if True, values for parameters in openapi_types
126 | will be type checked and a TypeError will be
127 | raised if the wrong type is input.
128 | Defaults to True
129 | _path_to_item (tuple/list): This is a list of keys or values to
130 | drill down to the model in received_data
131 | when deserializing a response
132 | _spec_property_naming (bool): True if the variable names in the input data
133 | are serialized names, as specified in the OpenAPI document.
134 | False if the variable names in the input data
135 | are pythonic names, e.g. snake case (default)
136 | _configuration (Configuration): the instance to use when
137 | deserializing a file_type parameter.
138 | If passed, type conversion is attempted
139 | If omitted no type conversion is done.
140 | _visited_composed_classes (tuple): This stores a tuple of
141 | classes that we have traveled through so that
142 | if we see that class again we will not use its
143 | discriminator again.
144 | When traveling through a discriminator, the
145 | composed schema that is
146 | is traveled through is added to this set.
147 | For example if Animal has a discriminator
148 | petType and we pass in "Dog", and the class Dog
149 | allOf includes Animal, we move through Animal
150 | once using the discriminator, and pick Dog.
151 | Then in Dog, we will make an instance of the
152 | Animal class but this time we won't travel
153 | through its discriminator because we passed in
154 | _visited_composed_classes = (Animal,)
155 | metadata (Metadata): [optional] # noqa: E501
156 | haltestellen ([HaltestelleDto]): [optional] # noqa: E501
157 | """
158 |
159 | _check_type = kwargs.pop("_check_type", True)
160 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
161 | _path_to_item = kwargs.pop("_path_to_item", ())
162 | _configuration = kwargs.pop("_configuration", None)
163 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
164 |
165 | self = super(OpenApiModel, cls).__new__(cls)
166 |
167 | if args:
168 | for arg in args:
169 | if isinstance(arg, dict):
170 | kwargs.update(arg)
171 | else:
172 | raise ApiTypeError(
173 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
174 | % (
175 | args,
176 | self.__class__.__name__,
177 | ),
178 | path_to_item=_path_to_item,
179 | valid_classes=(self.__class__,),
180 | )
181 |
182 | self._data_store = {}
183 | self._check_type = _check_type
184 | self._spec_property_naming = _spec_property_naming
185 | self._path_to_item = _path_to_item
186 | self._configuration = _configuration
187 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
188 |
189 | for var_name, var_value in kwargs.items():
190 | if (
191 | var_name not in self.attribute_map
192 | and self._configuration is not None
193 | and self._configuration.discard_unknown_keys
194 | and self.additional_properties_type is None
195 | ):
196 | # discard variable.
197 | continue
198 | setattr(self, var_name, var_value)
199 | return self
200 |
201 | required_properties = set(
202 | [
203 | "_data_store",
204 | "_check_type",
205 | "_spec_property_naming",
206 | "_path_to_item",
207 | "_configuration",
208 | "_visited_composed_classes",
209 | ]
210 | )
211 |
212 | @convert_js_args_to_python_args
213 | def __init__(self, *args, **kwargs): # noqa: E501
214 | """HaltestellenAPIResponse - a model defined in OpenAPI
215 |
216 | Keyword Args:
217 | _check_type (bool): if True, values for parameters in openapi_types
218 | will be type checked and a TypeError will be
219 | raised if the wrong type is input.
220 | Defaults to True
221 | _path_to_item (tuple/list): This is a list of keys or values to
222 | drill down to the model in received_data
223 | when deserializing a response
224 | _spec_property_naming (bool): True if the variable names in the input data
225 | are serialized names, as specified in the OpenAPI document.
226 | False if the variable names in the input data
227 | are pythonic names, e.g. snake case (default)
228 | _configuration (Configuration): the instance to use when
229 | deserializing a file_type parameter.
230 | If passed, type conversion is attempted
231 | If omitted no type conversion is done.
232 | _visited_composed_classes (tuple): This stores a tuple of
233 | classes that we have traveled through so that
234 | if we see that class again we will not use its
235 | discriminator again.
236 | When traveling through a discriminator, the
237 | composed schema that is
238 | is traveled through is added to this set.
239 | For example if Animal has a discriminator
240 | petType and we pass in "Dog", and the class Dog
241 | allOf includes Animal, we move through Animal
242 | once using the discriminator, and pick Dog.
243 | Then in Dog, we will make an instance of the
244 | Animal class but this time we won't travel
245 | through its discriminator because we passed in
246 | _visited_composed_classes = (Animal,)
247 | metadata (Metadata): [optional] # noqa: E501
248 | haltestellen ([HaltestelleDto]): [optional] # noqa: E501
249 | """
250 |
251 | _check_type = kwargs.pop("_check_type", True)
252 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
253 | _path_to_item = kwargs.pop("_path_to_item", ())
254 | _configuration = kwargs.pop("_configuration", None)
255 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
256 |
257 | if args:
258 | for arg in args:
259 | if isinstance(arg, dict):
260 | kwargs.update(arg)
261 | else:
262 | raise ApiTypeError(
263 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
264 | % (
265 | args,
266 | self.__class__.__name__,
267 | ),
268 | path_to_item=_path_to_item,
269 | valid_classes=(self.__class__,),
270 | )
271 |
272 | self._data_store = {}
273 | self._check_type = _check_type
274 | self._spec_property_naming = _spec_property_naming
275 | self._path_to_item = _path_to_item
276 | self._configuration = _configuration
277 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
278 |
279 | for var_name, var_value in kwargs.items():
280 | if (
281 | var_name not in self.attribute_map
282 | and self._configuration is not None
283 | and self._configuration.discard_unknown_keys
284 | and self.additional_properties_type is None
285 | ):
286 | # discard variable.
287 | continue
288 | setattr(self, var_name, var_value)
289 | if var_name in self.read_only_vars:
290 | raise ApiAttributeError(
291 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
292 | f"class with read only attributes."
293 | )
294 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/model/metadata.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.vag.exceptions import ApiAttributeError
16 | from deutschland.vag.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | class Metadata(ModelNormal):
34 | """NOTE: This class is auto generated by OpenAPI Generator.
35 | Ref: https://openapi-generator.tech
36 |
37 | Do not edit the class manually.
38 |
39 | Attributes:
40 | allowed_values (dict): The key is the tuple path to the attribute
41 | and the for var_name this is (var_name,). The value is a dict
42 | with a capitalized key describing the allowed value and an allowed
43 | value. These dicts store the allowed enum values.
44 | attribute_map (dict): The key is attribute name
45 | and the value is json key in definition.
46 | discriminator_value_class_map (dict): A dict to go from the discriminator
47 | variable value to the discriminator class name.
48 | validations (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | that stores validations for max_length, min_length, max_items,
51 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52 | inclusive_minimum, and regex.
53 | additional_properties_type (tuple): A tuple of classes accepted
54 | as additional properties values.
55 | """
56 |
57 | allowed_values = {}
58 |
59 | validations = {}
60 |
61 | @cached_property
62 | def additional_properties_type():
63 | """
64 | This must be a method because a model may have properties that are
65 | of type self, this must run after the class is loaded
66 | """
67 | return (
68 | bool,
69 | date,
70 | datetime,
71 | dict,
72 | float,
73 | int,
74 | list,
75 | str,
76 | none_type,
77 | ) # noqa: E501
78 |
79 | _nullable = False
80 |
81 | @cached_property
82 | def openapi_types():
83 | """
84 | This must be a method because a model may have properties that are
85 | of type self, this must run after the class is loaded
86 |
87 | Returns
88 | openapi_types (dict): The key is attribute name
89 | and the value is attribute type.
90 | """
91 | return {
92 | "version": (str,), # noqa: E501
93 | "timestamp": (str,), # noqa: E501
94 | }
95 |
96 | @cached_property
97 | def discriminator():
98 | return None
99 |
100 | attribute_map = {
101 | "version": "Version", # noqa: E501
102 | "timestamp": "Timestamp", # noqa: E501
103 | }
104 |
105 | read_only_vars = {}
106 |
107 | _composed_schemas = {}
108 |
109 | @classmethod
110 | @convert_js_args_to_python_args
111 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
112 | """Metadata - a model defined in OpenAPI
113 |
114 | Keyword Args:
115 | _check_type (bool): if True, values for parameters in openapi_types
116 | will be type checked and a TypeError will be
117 | raised if the wrong type is input.
118 | Defaults to True
119 | _path_to_item (tuple/list): This is a list of keys or values to
120 | drill down to the model in received_data
121 | when deserializing a response
122 | _spec_property_naming (bool): True if the variable names in the input data
123 | are serialized names, as specified in the OpenAPI document.
124 | False if the variable names in the input data
125 | are pythonic names, e.g. snake case (default)
126 | _configuration (Configuration): the instance to use when
127 | deserializing a file_type parameter.
128 | If passed, type conversion is attempted
129 | If omitted no type conversion is done.
130 | _visited_composed_classes (tuple): This stores a tuple of
131 | classes that we have traveled through so that
132 | if we see that class again we will not use its
133 | discriminator again.
134 | When traveling through a discriminator, the
135 | composed schema that is
136 | is traveled through is added to this set.
137 | For example if Animal has a discriminator
138 | petType and we pass in "Dog", and the class Dog
139 | allOf includes Animal, we move through Animal
140 | once using the discriminator, and pick Dog.
141 | Then in Dog, we will make an instance of the
142 | Animal class but this time we won't travel
143 | through its discriminator because we passed in
144 | _visited_composed_classes = (Animal,)
145 | version (str): [optional] # noqa: E501
146 | timestamp (str): [optional] # noqa: E501
147 | """
148 |
149 | _check_type = kwargs.pop("_check_type", True)
150 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
151 | _path_to_item = kwargs.pop("_path_to_item", ())
152 | _configuration = kwargs.pop("_configuration", None)
153 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
154 |
155 | self = super(OpenApiModel, cls).__new__(cls)
156 |
157 | if args:
158 | for arg in args:
159 | if isinstance(arg, dict):
160 | kwargs.update(arg)
161 | else:
162 | raise ApiTypeError(
163 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
164 | % (
165 | args,
166 | self.__class__.__name__,
167 | ),
168 | path_to_item=_path_to_item,
169 | valid_classes=(self.__class__,),
170 | )
171 |
172 | self._data_store = {}
173 | self._check_type = _check_type
174 | self._spec_property_naming = _spec_property_naming
175 | self._path_to_item = _path_to_item
176 | self._configuration = _configuration
177 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
178 |
179 | for var_name, var_value in kwargs.items():
180 | if (
181 | var_name not in self.attribute_map
182 | and self._configuration is not None
183 | and self._configuration.discard_unknown_keys
184 | and self.additional_properties_type is None
185 | ):
186 | # discard variable.
187 | continue
188 | setattr(self, var_name, var_value)
189 | return self
190 |
191 | required_properties = set(
192 | [
193 | "_data_store",
194 | "_check_type",
195 | "_spec_property_naming",
196 | "_path_to_item",
197 | "_configuration",
198 | "_visited_composed_classes",
199 | ]
200 | )
201 |
202 | @convert_js_args_to_python_args
203 | def __init__(self, *args, **kwargs): # noqa: E501
204 | """Metadata - a model defined in OpenAPI
205 |
206 | Keyword Args:
207 | _check_type (bool): if True, values for parameters in openapi_types
208 | will be type checked and a TypeError will be
209 | raised if the wrong type is input.
210 | Defaults to True
211 | _path_to_item (tuple/list): This is a list of keys or values to
212 | drill down to the model in received_data
213 | when deserializing a response
214 | _spec_property_naming (bool): True if the variable names in the input data
215 | are serialized names, as specified in the OpenAPI document.
216 | False if the variable names in the input data
217 | are pythonic names, e.g. snake case (default)
218 | _configuration (Configuration): the instance to use when
219 | deserializing a file_type parameter.
220 | If passed, type conversion is attempted
221 | If omitted no type conversion is done.
222 | _visited_composed_classes (tuple): This stores a tuple of
223 | classes that we have traveled through so that
224 | if we see that class again we will not use its
225 | discriminator again.
226 | When traveling through a discriminator, the
227 | composed schema that is
228 | is traveled through is added to this set.
229 | For example if Animal has a discriminator
230 | petType and we pass in "Dog", and the class Dog
231 | allOf includes Animal, we move through Animal
232 | once using the discriminator, and pick Dog.
233 | Then in Dog, we will make an instance of the
234 | Animal class but this time we won't travel
235 | through its discriminator because we passed in
236 | _visited_composed_classes = (Animal,)
237 | version (str): [optional] # noqa: E501
238 | timestamp (str): [optional] # noqa: E501
239 | """
240 |
241 | _check_type = kwargs.pop("_check_type", True)
242 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
243 | _path_to_item = kwargs.pop("_path_to_item", ())
244 | _configuration = kwargs.pop("_configuration", None)
245 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
246 |
247 | if args:
248 | for arg in args:
249 | if isinstance(arg, dict):
250 | kwargs.update(arg)
251 | else:
252 | raise ApiTypeError(
253 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
254 | % (
255 | args,
256 | self.__class__.__name__,
257 | ),
258 | path_to_item=_path_to_item,
259 | valid_classes=(self.__class__,),
260 | )
261 |
262 | self._data_store = {}
263 | self._check_type = _check_type
264 | self._spec_property_naming = _spec_property_naming
265 | self._path_to_item = _path_to_item
266 | self._configuration = _configuration
267 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
268 |
269 | for var_name, var_value in kwargs.items():
270 | if (
271 | var_name not in self.attribute_map
272 | and self._configuration is not None
273 | and self._configuration.discard_unknown_keys
274 | and self.additional_properties_type is None
275 | ):
276 | # discard variable.
277 | continue
278 | setattr(self, var_name, var_value)
279 | if var_name in self.read_only_vars:
280 | raise ApiAttributeError(
281 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
282 | f"class with read only attributes."
283 | )
284 |
--------------------------------------------------------------------------------
/python-client/deutschland/vag/models/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | # import all models into this package
4 | # if you have many models here with many references from one model to another this may
5 | # raise a RecursionError
6 | # to avoid this, import only the models that you directly need like:
7 | # from from deutschland.vag.model.pet import Pet
8 | # or import this package, but before doing it, use:
9 | # import sys
10 | # sys.setrecursionlimit(n)
11 |
12 | from deutschland.vag.model.abfahrt_dto import AbfahrtDto
13 | from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
14 | from deutschland.vag.model.fahrt_dto import FahrtDto
15 | from deutschland.vag.model.fahrten_api_response import FahrtenAPIResponse
16 | from deutschland.vag.model.fahrweg_halteposition_dto import FahrwegHaltepositionDto
17 | from deutschland.vag.model.haltestelle_dto import HaltestelleDto
18 | from deutschland.vag.model.haltestellen_api_response import HaltestellenAPIResponse
19 | from deutschland.vag.model.metadata import Metadata
20 |
--------------------------------------------------------------------------------
/python-client/docs/AbfahrtDto.md:
--------------------------------------------------------------------------------
1 | # AbfahrtDto
2 |
3 | Datenklasse für die Abfahrtsdaten einer Fahrt an einem Haltepunkt
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **linienname** | **str** | | [optional]
9 | **haltepunkt** | **str** | | [optional]
10 | **richtung** | **str** | | [optional]
11 | **richtungstext** | **str** | | [optional]
12 | **ankunftszeit_soll** | **str** | | [optional]
13 | **ankunftszeit_ist** | **str** | | [optional]
14 | **abfahrtszeit_soll** | **str** | | [optional]
15 | **abfahrtszeit_ist** | **str** | | [optional]
16 | **produkt** | **str** | | [optional]
17 | **longitude** | **float** | | [optional]
18 | **latitude** | **float** | | [optional]
19 | **fahrtnummer** | **int** | | [optional]
20 | **fahrtartnummer** | **int** | | [optional]
21 | **fahrzeugnummer** | **str** | | [optional]
22 | **prognose** | **bool** | | [optional]
23 | **haltesteig_text** | **str** | | [optional]
24 | **abfahrtszeiten_ausblenden** | **bool** | | [optional]
25 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
26 |
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/python-client/docs/AbfahrtenAPIResponse.md:
--------------------------------------------------------------------------------
1 | # AbfahrtenAPIResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **metadata** | [**Metadata**](Metadata.md) | | [optional]
8 | **haltestellenname** | **str** | | [optional]
9 | **vag_kennung** | **str** | | [optional]
10 | **vgn_kennung** | **int** | | [optional]
11 | **abfahrten** | [**[AbfahrtDto]**](AbfahrtDto.md) | | [optional]
12 | **sonderinformationen** | **[str]** | | [optional]
13 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/python-client/docs/AbfahrtenApi.md:
--------------------------------------------------------------------------------
1 | # vag.AbfahrtenApi
2 |
3 | All URIs are relative to *https://start.vag.de/dm*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**abfahrten_get1**](AbfahrtenApi.md#abfahrten_get1) | **GET** /api/v1/abfahrten/{netvu}/{haltid} | Liefert die Abfahrten zu einer bestimmten Haltestelle
8 | [**abfahrten_get2**](AbfahrtenApi.md#abfahrten_get2) | **GET** /api/v1/abfahrten/{netvu}/{haltid}/{line} | Liefert die Abfahrten zu einer bestimmten Haltestelle
9 |
10 |
11 | # **abfahrten_get1**
12 | > AbfahrtenAPIResponse abfahrten_get1(netvu, haltid)
13 |
14 | Liefert die Abfahrten zu einer bestimmten Haltestelle
15 |
16 | ### Example
17 |
18 |
19 | ```python
20 | import time
21 | from deutschland import vag
22 | from deutschland.vag.api import abfahrten_api
23 | from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
24 | from pprint import pprint
25 | # Defining the host is optional and defaults to https://start.vag.de/dm
26 | # See configuration.py for a list of all supported configuration parameters.
27 | configuration = vag.Configuration(
28 | host = "https://start.vag.de/dm"
29 | )
30 |
31 |
32 | # Enter a context with an instance of the API client
33 | with vag.ApiClient() as api_client:
34 | # Create an instance of the API class
35 | api_instance = abfahrten_api.AbfahrtenApi(api_client)
36 | netvu = "netvu_example" # str | Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
37 | haltid = "haltid_example" # str | Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG
38 | product = "product_example" # str | Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram (optional)
39 | timespan = 1 # int | Zeitfenster für die Abfrage in Minuten (?timespan=10) (optional)
40 | timedelay = 1 # int | Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5) (optional)
41 | limitcount = 1 # int | Maximale Anzahl der zurückgelieferten Abfahrten (optional)
42 |
43 | # example passing only required values which don't have defaults set
44 | try:
45 | # Liefert die Abfahrten zu einer bestimmten Haltestelle
46 | api_response = api_instance.abfahrten_get1(netvu, haltid)
47 | pprint(api_response)
48 | except vag.ApiException as e:
49 | print("Exception when calling AbfahrtenApi->abfahrten_get1: %s\n" % e)
50 |
51 | # example passing only required values which don't have defaults set
52 | # and optional values
53 | try:
54 | # Liefert die Abfahrten zu einer bestimmten Haltestelle
55 | api_response = api_instance.abfahrten_get1(netvu, haltid, product=product, timespan=timespan, timedelay=timedelay, limitcount=limitcount)
56 | pprint(api_response)
57 | except vag.ApiException as e:
58 | print("Exception when calling AbfahrtenApi->abfahrten_get1: %s\n" % e)
59 | ```
60 |
61 |
62 | ### Parameters
63 |
64 | Name | Type | Description | Notes
65 | ------------- | ------------- | ------------- | -------------
66 | **netvu** | **str**| Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\" |
67 | **haltid** | **str**| Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG |
68 | **product** | **str**| Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram | [optional]
69 | **timespan** | **int**| Zeitfenster für die Abfrage in Minuten (?timespan=10) | [optional]
70 | **timedelay** | **int**| Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5) | [optional]
71 | **limitcount** | **int**| Maximale Anzahl der zurückgelieferten Abfahrten | [optional]
72 |
73 | ### Return type
74 |
75 | [**AbfahrtenAPIResponse**](AbfahrtenAPIResponse.md)
76 |
77 | ### Authorization
78 |
79 | No authorization required
80 |
81 | ### HTTP request headers
82 |
83 | - **Content-Type**: Not defined
84 | - **Accept**: application/json, text/json, application/xml, text/xml
85 |
86 |
87 | ### HTTP response details
88 |
89 | | Status code | Description | Response headers |
90 | |-------------|-------------|------------------|
91 | **200** | OK | - |
92 | **404** | NotFound | - |
93 |
94 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
95 |
96 | # **abfahrten_get2**
97 | > AbfahrtenAPIResponse abfahrten_get2(netvu, haltid, line)
98 |
99 | Liefert die Abfahrten zu einer bestimmten Haltestelle
100 |
101 | ### Example
102 |
103 |
104 | ```python
105 | import time
106 | from deutschland import vag
107 | from deutschland.vag.api import abfahrten_api
108 | from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
109 | from pprint import pprint
110 | # Defining the host is optional and defaults to https://start.vag.de/dm
111 | # See configuration.py for a list of all supported configuration parameters.
112 | configuration = vag.Configuration(
113 | host = "https://start.vag.de/dm"
114 | )
115 |
116 |
117 | # Enter a context with an instance of the API client
118 | with vag.ApiClient() as api_client:
119 | # Create an instance of the API class
120 | api_instance = abfahrten_api.AbfahrtenApi(api_client)
121 | netvu = "netvu_example" # str | Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
122 | haltid = "haltid_example" # str | Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG
123 | line = "line_example" # str | Linienkürzel der VAG
124 | product = "product_example" # str | Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram (optional)
125 | timespan = 1 # int | Zeitfenster für die Abfrage in Minuten (?timespan=10) (optional)
126 | timedelay = 1 # int | Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5) (optional)
127 | limitcount = 1 # int | Maximale Anzahl der zurückgelieferten Abfahrten (optional)
128 |
129 | # example passing only required values which don't have defaults set
130 | try:
131 | # Liefert die Abfahrten zu einer bestimmten Haltestelle
132 | api_response = api_instance.abfahrten_get2(netvu, haltid, line)
133 | pprint(api_response)
134 | except vag.ApiException as e:
135 | print("Exception when calling AbfahrtenApi->abfahrten_get2: %s\n" % e)
136 |
137 | # example passing only required values which don't have defaults set
138 | # and optional values
139 | try:
140 | # Liefert die Abfahrten zu einer bestimmten Haltestelle
141 | api_response = api_instance.abfahrten_get2(netvu, haltid, line, product=product, timespan=timespan, timedelay=timedelay, limitcount=limitcount)
142 | pprint(api_response)
143 | except vag.ApiException as e:
144 | print("Exception when calling AbfahrtenApi->abfahrten_get2: %s\n" % e)
145 | ```
146 |
147 |
148 | ### Parameters
149 |
150 | Name | Type | Description | Notes
151 | ------------- | ------------- | ------------- | -------------
152 | **netvu** | **str**| Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\" |
153 | **haltid** | **str**| Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG |
154 | **line** | **str**| Linienkürzel der VAG |
155 | **product** | **str**| Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram | [optional]
156 | **timespan** | **int**| Zeitfenster für die Abfrage in Minuten (?timespan=10) | [optional]
157 | **timedelay** | **int**| Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5) | [optional]
158 | **limitcount** | **int**| Maximale Anzahl der zurückgelieferten Abfahrten | [optional]
159 |
160 | ### Return type
161 |
162 | [**AbfahrtenAPIResponse**](AbfahrtenAPIResponse.md)
163 |
164 | ### Authorization
165 |
166 | No authorization required
167 |
168 | ### HTTP request headers
169 |
170 | - **Content-Type**: Not defined
171 | - **Accept**: application/json, text/json, application/xml, text/xml
172 |
173 |
174 | ### HTTP response details
175 |
176 | | Status code | Description | Response headers |
177 | |-------------|-------------|------------------|
178 | **200** | OK | - |
179 | **404** | NotFound | - |
180 |
181 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
182 |
183 |
--------------------------------------------------------------------------------
/python-client/docs/FahrtDto.md:
--------------------------------------------------------------------------------
1 | # FahrtDto
2 |
3 | Antwortobjekt für eine Fahrt in der Fahrtenliste
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **fahrtnummer** | **int** | | [optional]
9 | **linienname** | **str** | | [optional]
10 | **richtung** | **str** | | [optional]
11 | **betriebstag** | **str** | | [optional]
12 | **startzeit** | **str** | | [optional]
13 | **endzeit** | **str** | | [optional]
14 | **start_halt_id** | **str** | | [optional]
15 | **end_halt_id** | **str** | | [optional]
16 | **faellt_aus** | **bool** | | [optional]
17 | **zusatzfahrt** | **bool** | | [optional]
18 | **fahrzeugnummer** | **str** | | [optional]
19 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
20 |
21 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
22 |
23 |
24 |
--------------------------------------------------------------------------------
/python-client/docs/FahrtenAPIResponse.md:
--------------------------------------------------------------------------------
1 | # FahrtenAPIResponse
2 |
3 | Antwortklasse für die Fahrten-API Zugriffe
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **metadata** | [**Metadata**](Metadata.md) | | [optional]
9 | **linienname** | **str** | | [optional]
10 | **richtung** | **str** | | [optional]
11 | **richtungstext** | **str** | | [optional]
12 | **fahrtnummer** | **int** | | [optional]
13 | **betriebstag** | **str** | | [optional]
14 | **produkt** | **str** | | [optional]
15 | **faellt_aus** | **bool** | | [optional]
16 | **zusatzfahrt** | **bool** | | [optional]
17 | **fahrzeugnummer** | **str** | | [optional]
18 | **fahrtverlauf** | [**[FahrwegHaltepositionDto]**](FahrwegHaltepositionDto.md) | | [optional]
19 | **fahrten** | [**[FahrtDto]**](FahrtDto.md) | | [optional]
20 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
21 |
22 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
23 |
24 |
25 |
--------------------------------------------------------------------------------
/python-client/docs/FahrtenApi.md:
--------------------------------------------------------------------------------
1 | # vag.FahrtenApi
2 |
3 | All URIs are relative to *https://start.vag.de/dm*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**fahrten_get**](FahrtenApi.md#fahrten_get) | **GET** /api/v1/fahrten/{betriebszweig} | Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster.
8 | [**fahrten_get_fahrt1**](FahrtenApi.md#fahrten_get_fahrt1) | **GET** /api/v1/fahrten/{betriebszweig}/{fahrtnummer} | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem aktuellen Betriebstag
9 | [**fahrten_get_fahrt2**](FahrtenApi.md#fahrten_get_fahrt2) | **GET** /api/v1/fahrten/{betriebszweig}/{betriebstag}/{fahrtnummer} | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem angegebenen Betriebstag
10 |
11 |
12 | # **fahrten_get**
13 | > FahrtenAPIResponse fahrten_get(betriebszweig)
14 |
15 | Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster.
16 |
17 | ### Example
18 |
19 |
20 | ```python
21 | import time
22 | from deutschland import vag
23 | from deutschland.vag.api import fahrten_api
24 | from deutschland.vag.model.fahrten_api_response import FahrtenAPIResponse
25 | from pprint import pprint
26 | # Defining the host is optional and defaults to https://start.vag.de/dm
27 | # See configuration.py for a list of all supported configuration parameters.
28 | configuration = vag.Configuration(
29 | host = "https://start.vag.de/dm"
30 | )
31 |
32 |
33 | # Enter a context with an instance of the API client
34 | with vag.ApiClient() as api_client:
35 | # Create an instance of the API class
36 | api_instance = fahrten_api.FahrtenApi(api_client)
37 | betriebszweig = "betriebszweig_example" # str | Betriebszweig der VAG: Bus|Tram|UBahn
38 | timespan = 1 # int | Zeitfenster für die Abfrage in Minuten (Default 60 Minuten) (optional)
39 |
40 | # example passing only required values which don't have defaults set
41 | try:
42 | # Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster.
43 | api_response = api_instance.fahrten_get(betriebszweig)
44 | pprint(api_response)
45 | except vag.ApiException as e:
46 | print("Exception when calling FahrtenApi->fahrten_get: %s\n" % e)
47 |
48 | # example passing only required values which don't have defaults set
49 | # and optional values
50 | try:
51 | # Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster.
52 | api_response = api_instance.fahrten_get(betriebszweig, timespan=timespan)
53 | pprint(api_response)
54 | except vag.ApiException as e:
55 | print("Exception when calling FahrtenApi->fahrten_get: %s\n" % e)
56 | ```
57 |
58 |
59 | ### Parameters
60 |
61 | Name | Type | Description | Notes
62 | ------------- | ------------- | ------------- | -------------
63 | **betriebszweig** | **str**| Betriebszweig der VAG: Bus|Tram|UBahn |
64 | **timespan** | **int**| Zeitfenster für die Abfrage in Minuten (Default 60 Minuten) | [optional]
65 |
66 | ### Return type
67 |
68 | [**FahrtenAPIResponse**](FahrtenAPIResponse.md)
69 |
70 | ### Authorization
71 |
72 | No authorization required
73 |
74 | ### HTTP request headers
75 |
76 | - **Content-Type**: Not defined
77 | - **Accept**: application/json, text/json, application/xml, text/xml
78 |
79 |
80 | ### HTTP response details
81 |
82 | | Status code | Description | Response headers |
83 | |-------------|-------------|------------------|
84 | **200** | OK | - |
85 |
86 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
87 |
88 | # **fahrten_get_fahrt1**
89 | > FahrtenAPIResponse fahrten_get_fahrt1(betriebszweig, fahrtnummer)
90 |
91 | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem aktuellen Betriebstag
92 |
93 | ### Example
94 |
95 |
96 | ```python
97 | import time
98 | from deutschland import vag
99 | from deutschland.vag.api import fahrten_api
100 | from deutschland.vag.model.fahrten_api_response import FahrtenAPIResponse
101 | from pprint import pprint
102 | # Defining the host is optional and defaults to https://start.vag.de/dm
103 | # See configuration.py for a list of all supported configuration parameters.
104 | configuration = vag.Configuration(
105 | host = "https://start.vag.de/dm"
106 | )
107 |
108 |
109 | # Enter a context with an instance of the API client
110 | with vag.ApiClient() as api_client:
111 | # Create an instance of the API class
112 | api_instance = fahrten_api.FahrtenApi(api_client)
113 | betriebszweig = "betriebszweig_example" # str | Betriebszweig der VAG: Bus|Tram|UBahn
114 | fahrtnummer = 1 # int | Fahrtnummer für die Anfrage
115 |
116 | # example passing only required values which don't have defaults set
117 | try:
118 | # Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem aktuellen Betriebstag
119 | api_response = api_instance.fahrten_get_fahrt1(betriebszweig, fahrtnummer)
120 | pprint(api_response)
121 | except vag.ApiException as e:
122 | print("Exception when calling FahrtenApi->fahrten_get_fahrt1: %s\n" % e)
123 | ```
124 |
125 |
126 | ### Parameters
127 |
128 | Name | Type | Description | Notes
129 | ------------- | ------------- | ------------- | -------------
130 | **betriebszweig** | **str**| Betriebszweig der VAG: Bus|Tram|UBahn |
131 | **fahrtnummer** | **int**| Fahrtnummer für die Anfrage |
132 |
133 | ### Return type
134 |
135 | [**FahrtenAPIResponse**](FahrtenAPIResponse.md)
136 |
137 | ### Authorization
138 |
139 | No authorization required
140 |
141 | ### HTTP request headers
142 |
143 | - **Content-Type**: Not defined
144 | - **Accept**: application/json, text/json, application/xml, text/xml
145 |
146 |
147 | ### HTTP response details
148 |
149 | | Status code | Description | Response headers |
150 | |-------------|-------------|------------------|
151 | **200** | OK | - |
152 | **404** | NotFound | - |
153 |
154 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
155 |
156 | # **fahrten_get_fahrt2**
157 | > FahrtenAPIResponse fahrten_get_fahrt2(betriebszweig, betriebstag, fahrtnummer)
158 |
159 | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem angegebenen Betriebstag
160 |
161 | ### Example
162 |
163 |
164 | ```python
165 | import time
166 | from deutschland import vag
167 | from deutschland.vag.api import fahrten_api
168 | from deutschland.vag.model.fahrten_api_response import FahrtenAPIResponse
169 | from pprint import pprint
170 | # Defining the host is optional and defaults to https://start.vag.de/dm
171 | # See configuration.py for a list of all supported configuration parameters.
172 | configuration = vag.Configuration(
173 | host = "https://start.vag.de/dm"
174 | )
175 |
176 |
177 | # Enter a context with an instance of the API client
178 | with vag.ApiClient() as api_client:
179 | # Create an instance of the API class
180 | api_instance = fahrten_api.FahrtenApi(api_client)
181 | betriebszweig = "betriebszweig_example" # str | Betriebszweig der VAG: Bus|Tram|UBahn
182 | betriebstag = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Betriebstagsdatum für die Anfrag
183 | fahrtnummer = 1 # int | Fahrtnummer für die Anfrage
184 |
185 | # example passing only required values which don't have defaults set
186 | try:
187 | # Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem angegebenen Betriebstag
188 | api_response = api_instance.fahrten_get_fahrt2(betriebszweig, betriebstag, fahrtnummer)
189 | pprint(api_response)
190 | except vag.ApiException as e:
191 | print("Exception when calling FahrtenApi->fahrten_get_fahrt2: %s\n" % e)
192 | ```
193 |
194 |
195 | ### Parameters
196 |
197 | Name | Type | Description | Notes
198 | ------------- | ------------- | ------------- | -------------
199 | **betriebszweig** | **str**| Betriebszweig der VAG: Bus|Tram|UBahn |
200 | **betriebstag** | **datetime**| Betriebstagsdatum für die Anfrag |
201 | **fahrtnummer** | **int**| Fahrtnummer für die Anfrage |
202 |
203 | ### Return type
204 |
205 | [**FahrtenAPIResponse**](FahrtenAPIResponse.md)
206 |
207 | ### Authorization
208 |
209 | No authorization required
210 |
211 | ### HTTP request headers
212 |
213 | - **Content-Type**: Not defined
214 | - **Accept**: application/json, text/json, application/xml, text/xml
215 |
216 |
217 | ### HTTP response details
218 |
219 | | Status code | Description | Response headers |
220 | |-------------|-------------|------------------|
221 | **200** | OK | - |
222 | **404** | NotFound | - |
223 |
224 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
225 |
226 |
--------------------------------------------------------------------------------
/python-client/docs/FahrwegHaltepositionDto.md:
--------------------------------------------------------------------------------
1 | # FahrwegHaltepositionDto
2 |
3 | Halteposition zu einer Fahrt
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **haltestellenname** | **str** | | [optional]
9 | **vag_kennung** | **str** | | [optional]
10 | **vgn_kennung** | **int** | | [optional]
11 | **haltepunkt** | **str** | | [optional]
12 | **ankunftszeit_soll** | **str** | | [optional]
13 | **ankunftszeit_ist** | **str** | | [optional]
14 | **abfahrtszeit_soll** | **str** | | [optional]
15 | **abfahrtszeit_ist** | **str** | | [optional]
16 | **richtungstext** | **str** | | [optional]
17 | **longitude** | **float** | | [optional]
18 | **latitude** | **float** | | [optional]
19 | **durchfahrt** | **bool** | | [optional]
20 | **einsteigeverbot** | **bool** | | [optional]
21 | **aussteigeverbot** | **bool** | | [optional]
22 | **zusatzhalt** | **bool** | | [optional]
23 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
24 |
25 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
26 |
27 |
28 |
--------------------------------------------------------------------------------
/python-client/docs/HaltestelleDto.md:
--------------------------------------------------------------------------------
1 | # HaltestelleDto
2 |
3 | Datenklasse zur Haltestelle Antwort
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **haltestellenname** | **str** | | [optional]
9 | **vag_kennung** | **str** | | [optional]
10 | **vgn_kennung** | **int** | | [optional]
11 | **longitude** | **float** | | [optional]
12 | **latitude** | **float** | | [optional]
13 | **produkte** | **str** | | [optional]
14 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
15 |
16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17 |
18 |
19 |
--------------------------------------------------------------------------------
/python-client/docs/HaltestellenAPIResponse.md:
--------------------------------------------------------------------------------
1 | # HaltestellenAPIResponse
2 |
3 | Antwortklasse für die Haltestellen-API Zugriffe
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **metadata** | [**Metadata**](Metadata.md) | | [optional]
9 | **haltestellen** | [**[HaltestelleDto]**](HaltestelleDto.md) | | [optional]
10 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/python-client/docs/HaltestellenApi.md:
--------------------------------------------------------------------------------
1 | # vag.HaltestellenApi
2 |
3 | All URIs are relative to *https://start.vag.de/dm*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**haltestellen_get_by_location**](HaltestellenApi.md#haltestellen_get_by_location) | **GET** /api/v1/haltestellen/{netvu}/location | Liefert die Liste mit den Haltestellen zu der Umkreissuche
8 | [**haltestellen_get_by_name**](HaltestellenApi.md#haltestellen_get_by_name) | **GET** /api/v1/haltestellen/{netvu} | Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional)
9 |
10 |
11 | # **haltestellen_get_by_location**
12 | > HaltestellenAPIResponse haltestellen_get_by_location(netvu, lon, lat)
13 |
14 | Liefert die Liste mit den Haltestellen zu der Umkreissuche
15 |
16 | ### Example
17 |
18 |
19 | ```python
20 | import time
21 | from deutschland import vag
22 | from deutschland.vag.api import haltestellen_api
23 | from deutschland.vag.model.haltestellen_api_response import HaltestellenAPIResponse
24 | from pprint import pprint
25 | # Defining the host is optional and defaults to https://start.vag.de/dm
26 | # See configuration.py for a list of all supported configuration parameters.
27 | configuration = vag.Configuration(
28 | host = "https://start.vag.de/dm"
29 | )
30 |
31 |
32 | # Enter a context with an instance of the API client
33 | with vag.ApiClient() as api_client:
34 | # Create an instance of the API class
35 | api_instance = haltestellen_api.HaltestellenApi(api_client)
36 | netvu = "netvu_example" # str | Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
37 | lon = 3.14 # float | Longitude für die Umkreissuche in WGS 84 Format in Grad
38 | lat = 3.14 # float | Latitude für die Umkreissuche in WGS 84 Format in Grad
39 | radius = 1 # int | Radius für die Umkreissuche. Defaultwert = 1000 Meter. (optional)
40 |
41 | # example passing only required values which don't have defaults set
42 | try:
43 | # Liefert die Liste mit den Haltestellen zu der Umkreissuche
44 | api_response = api_instance.haltestellen_get_by_location(netvu, lon, lat)
45 | pprint(api_response)
46 | except vag.ApiException as e:
47 | print("Exception when calling HaltestellenApi->haltestellen_get_by_location: %s\n" % e)
48 |
49 | # example passing only required values which don't have defaults set
50 | # and optional values
51 | try:
52 | # Liefert die Liste mit den Haltestellen zu der Umkreissuche
53 | api_response = api_instance.haltestellen_get_by_location(netvu, lon, lat, radius=radius)
54 | pprint(api_response)
55 | except vag.ApiException as e:
56 | print("Exception when calling HaltestellenApi->haltestellen_get_by_location: %s\n" % e)
57 | ```
58 |
59 |
60 | ### Parameters
61 |
62 | Name | Type | Description | Notes
63 | ------------- | ------------- | ------------- | -------------
64 | **netvu** | **str**| Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\" |
65 | **lon** | **float**| Longitude für die Umkreissuche in WGS 84 Format in Grad |
66 | **lat** | **float**| Latitude für die Umkreissuche in WGS 84 Format in Grad |
67 | **radius** | **int**| Radius für die Umkreissuche. Defaultwert = 1000 Meter. | [optional]
68 |
69 | ### Return type
70 |
71 | [**HaltestellenAPIResponse**](HaltestellenAPIResponse.md)
72 |
73 | ### Authorization
74 |
75 | No authorization required
76 |
77 | ### HTTP request headers
78 |
79 | - **Content-Type**: Not defined
80 | - **Accept**: application/json, text/json, application/xml, text/xml
81 |
82 |
83 | ### HTTP response details
84 |
85 | | Status code | Description | Response headers |
86 | |-------------|-------------|------------------|
87 | **200** | OK | - |
88 |
89 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
90 |
91 | # **haltestellen_get_by_name**
92 | > HaltestellenAPIResponse haltestellen_get_by_name(netvu, name)
93 |
94 | Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional)
95 |
96 | ### Example
97 |
98 |
99 | ```python
100 | import time
101 | from deutschland import vag
102 | from deutschland.vag.api import haltestellen_api
103 | from deutschland.vag.model.haltestellen_api_response import HaltestellenAPIResponse
104 | from pprint import pprint
105 | # Defining the host is optional and defaults to https://start.vag.de/dm
106 | # See configuration.py for a list of all supported configuration parameters.
107 | configuration = vag.Configuration(
108 | host = "https://start.vag.de/dm"
109 | )
110 |
111 |
112 | # Enter a context with an instance of the API client
113 | with vag.ApiClient() as api_client:
114 | # Create an instance of the API class
115 | api_instance = haltestellen_api.HaltestellenApi(api_client)
116 | netvu = "netvu_example" # str | Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
117 | name = "name_example" # str | Name der Haltestelle (like)
118 |
119 | # example passing only required values which don't have defaults set
120 | try:
121 | # Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional)
122 | api_response = api_instance.haltestellen_get_by_name(netvu, name)
123 | pprint(api_response)
124 | except vag.ApiException as e:
125 | print("Exception when calling HaltestellenApi->haltestellen_get_by_name: %s\n" % e)
126 | ```
127 |
128 |
129 | ### Parameters
130 |
131 | Name | Type | Description | Notes
132 | ------------- | ------------- | ------------- | -------------
133 | **netvu** | **str**| Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\" |
134 | **name** | **str**| Name der Haltestelle (like) |
135 |
136 | ### Return type
137 |
138 | [**HaltestellenAPIResponse**](HaltestellenAPIResponse.md)
139 |
140 | ### Authorization
141 |
142 | No authorization required
143 |
144 | ### HTTP request headers
145 |
146 | - **Content-Type**: Not defined
147 | - **Accept**: application/json, text/json, application/xml, text/xml
148 |
149 |
150 | ### HTTP response details
151 |
152 | | Status code | Description | Response headers |
153 | |-------------|-------------|------------------|
154 | **200** | OK | - |
155 |
156 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
157 |
158 |
--------------------------------------------------------------------------------
/python-client/docs/Metadata.md:
--------------------------------------------------------------------------------
1 | # Metadata
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **version** | **str** | | [optional]
8 | **timestamp** | **str** | | [optional]
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/python-client/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool]
2 | [tool.poetry]
3 | name = "de-vag"
4 | version = "0.1.0"
5 | description = "VAG API"
6 | keywords = ["OpenAPI", "OpenAPI-Generator", "vag", "App", "API"]
7 | homepage = "https://github.com/bundesAPI/vag-api"
8 | authors = ["BundesAPI "]
9 | packages = [
10 | { include = "deutschland"}
11 | ]
12 | license = "Apache-2.0"
13 | readme = "README.md"
14 |
15 | [tool.poetry.dependencies]
16 | python = ">=3.6"
17 | python-dateutil = "*"
18 | urllib3 = ">=1.25.3"
19 |
20 | [tool.poetry.urls]
21 | "Bug Tracker" = "https://github.com/bundesAPI/vag-api/issues"
22 |
23 | [tool.poetry.dev-dependencies]
24 | black = "^21.7b0"
25 | pytest = "^6.2.4"
26 |
27 |
28 | [build-system]
29 | requires = ["poetry-core>=1.0.0"]
30 | build-backend = "poetry.core.masonry.api"
31 |
32 |
--------------------------------------------------------------------------------
/python-client/requirements.txt:
--------------------------------------------------------------------------------
1 | python_dateutil >= 2.5.3
2 | setuptools >= 59.0.0
3 | urllib3 >= 1.25.3
4 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/conf.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 |
4 | sys.path.insert(0, os.path.abspath("../"))
5 | # Configuration file for the Sphinx documentation builder.
6 | #
7 | # For the full list of built-in configuration values, see the documentation:
8 | # https://www.sphinx-doc.org/en/master/usage/configuration.html
9 |
10 | # -- Project information -----------------------------------------------------
11 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12 |
13 | project = "vag-api"
14 | copyright = "2022, BundesAPI"
15 | author = "BundesAPI"
16 |
17 | version = "0.1.0"
18 | release = "0.1.0"
19 |
20 | # -- General configuration ---------------------------------------------------
21 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
22 |
23 | extensions = [
24 | "m2r2",
25 | "sphinx.ext.autodoc",
26 | "sphinx.ext.napoleon",
27 | "sphinx.ext.autosummary",
28 | ]
29 |
30 | templates_path = ["_templates"]
31 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
32 |
33 | language = "de"
34 |
35 | # -- Options for HTML output -------------------------------------------------
36 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
37 |
38 | html_theme = "alabaster"
39 | html_static_path = ["_static"]
40 |
41 | source_extensions = [".rst", ".md"]
42 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/index.rst:
--------------------------------------------------------------------------------
1 | vag-api Documentation
2 | =====================
3 |
4 | .. toctree::
5 | :glob:
6 |
7 | source/*
8 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=.
11 | set BUILDDIR=_build
12 |
13 | %SPHINXBUILD% >NUL 2>NUL
14 | if errorlevel 9009 (
15 | echo.
16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17 | echo.installed, then set the SPHINXBUILD environment variable to point
18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
19 | echo.may add the Sphinx directory to PATH.
20 | echo.
21 | echo.If you don't have Sphinx installed, grab it from
22 | echo.https://www.sphinx-doc.org/
23 | exit /b 1
24 | )
25 |
26 | if "%1" == "" goto help
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/modules.rst:
--------------------------------------------------------------------------------
1 | deutschland
2 | ===========
3 |
4 | .. toctree::
5 | :maxdepth: 4
6 |
7 | vag
8 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/vag.api.rst:
--------------------------------------------------------------------------------
1 | vag.api package
2 | ===============
3 |
4 | Submodules
5 | ----------
6 |
7 | vag.api.abfahrten\_api module
8 | -----------------------------
9 |
10 | .. automodule:: vag.api.abfahrten_api
11 | :members:
12 | :undoc-members:
13 | :show-inheritance:
14 |
15 | vag.api.fahrten\_api module
16 | ---------------------------
17 |
18 | .. automodule:: vag.api.fahrten_api
19 | :members:
20 | :undoc-members:
21 | :show-inheritance:
22 |
23 | vag.api.haltestellen\_api module
24 | --------------------------------
25 |
26 | .. automodule:: vag.api.haltestellen_api
27 | :members:
28 | :undoc-members:
29 | :show-inheritance:
30 |
31 | Module contents
32 | ---------------
33 |
34 | .. automodule:: vag.api
35 | :members:
36 | :undoc-members:
37 | :show-inheritance:
38 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/vag.apis.rst:
--------------------------------------------------------------------------------
1 | vag.apis package
2 | ================
3 |
4 | Module contents
5 | ---------------
6 |
7 | .. automodule:: vag.apis
8 | :members:
9 | :undoc-members:
10 | :show-inheritance:
11 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/vag.model.rst:
--------------------------------------------------------------------------------
1 | vag.model package
2 | =================
3 |
4 | Submodules
5 | ----------
6 |
7 | vag.model.abfahrt\_dto module
8 | -----------------------------
9 |
10 | .. automodule:: vag.model.abfahrt_dto
11 | :members:
12 | :undoc-members:
13 | :show-inheritance:
14 |
15 | vag.model.abfahrten\_api\_response module
16 | -----------------------------------------
17 |
18 | .. automodule:: vag.model.abfahrten_api_response
19 | :members:
20 | :undoc-members:
21 | :show-inheritance:
22 |
23 | vag.model.fahrt\_dto module
24 | ---------------------------
25 |
26 | .. automodule:: vag.model.fahrt_dto
27 | :members:
28 | :undoc-members:
29 | :show-inheritance:
30 |
31 | vag.model.fahrten\_api\_response module
32 | ---------------------------------------
33 |
34 | .. automodule:: vag.model.fahrten_api_response
35 | :members:
36 | :undoc-members:
37 | :show-inheritance:
38 |
39 | vag.model.fahrweg\_halteposition\_dto module
40 | --------------------------------------------
41 |
42 | .. automodule:: vag.model.fahrweg_halteposition_dto
43 | :members:
44 | :undoc-members:
45 | :show-inheritance:
46 |
47 | vag.model.haltestelle\_dto module
48 | ---------------------------------
49 |
50 | .. automodule:: vag.model.haltestelle_dto
51 | :members:
52 | :undoc-members:
53 | :show-inheritance:
54 |
55 | vag.model.haltestellen\_api\_response module
56 | --------------------------------------------
57 |
58 | .. automodule:: vag.model.haltestellen_api_response
59 | :members:
60 | :undoc-members:
61 | :show-inheritance:
62 |
63 | vag.model.metadata module
64 | -------------------------
65 |
66 | .. automodule:: vag.model.metadata
67 | :members:
68 | :undoc-members:
69 | :show-inheritance:
70 |
71 | Module contents
72 | ---------------
73 |
74 | .. automodule:: vag.model
75 | :members:
76 | :undoc-members:
77 | :show-inheritance:
78 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/vag.models.rst:
--------------------------------------------------------------------------------
1 | vag.models package
2 | ==================
3 |
4 | Module contents
5 | ---------------
6 |
7 | .. automodule:: vag.models
8 | :members:
9 | :undoc-members:
10 | :show-inheritance:
11 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/vag.rst:
--------------------------------------------------------------------------------
1 | vag package
2 | ===========
3 |
4 | Subpackages
5 | -----------
6 |
7 | .. toctree::
8 | :maxdepth: 4
9 |
10 | vag.api
11 | vag.apis
12 | vag.model
13 | vag.models
14 |
15 | Submodules
16 | ----------
17 |
18 | vag.api\_client module
19 | ----------------------
20 |
21 | .. automodule:: vag.api_client
22 | :members:
23 | :undoc-members:
24 | :show-inheritance:
25 |
26 | vag.configuration module
27 | ------------------------
28 |
29 | .. automodule:: vag.configuration
30 | :members:
31 | :undoc-members:
32 | :show-inheritance:
33 |
34 | vag.exceptions module
35 | ---------------------
36 |
37 | .. automodule:: vag.exceptions
38 | :members:
39 | :undoc-members:
40 | :show-inheritance:
41 |
42 | vag.model\_utils module
43 | -----------------------
44 |
45 | .. automodule:: vag.model_utils
46 | :members:
47 | :undoc-members:
48 | :show-inheritance:
49 |
50 | vag.rest module
51 | ---------------
52 |
53 | .. automodule:: vag.rest
54 | :members:
55 | :undoc-members:
56 | :show-inheritance:
57 |
58 | Module contents
59 | ---------------
60 |
61 | .. automodule:: vag
62 | :members:
63 | :undoc-members:
64 | :show-inheritance:
65 |
--------------------------------------------------------------------------------
/python-client/test-requirements.txt:
--------------------------------------------------------------------------------
1 | pytest-cov>=2.8.1
2 |
--------------------------------------------------------------------------------
/python-client/test/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bundesAPI/vag-api/f19097db18f8e108a4fcb9771d533d7b440404e2/python-client/test/__init__.py
--------------------------------------------------------------------------------
/python-client/test/test_abfahrt_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.abfahrt_dto import AbfahrtDto
16 |
17 | from deutschland import vag
18 |
19 |
20 | class TestAbfahrtDto(unittest.TestCase):
21 | """AbfahrtDto unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testAbfahrtDto(self):
30 | """Test AbfahrtDto"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = AbfahrtDto() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_abfahrten_api.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import unittest
13 |
14 | from deutschland.vag.api.abfahrten_api import AbfahrtenApi # noqa: E501
15 |
16 | from deutschland import vag
17 |
18 |
19 | class TestAbfahrtenApi(unittest.TestCase):
20 | """AbfahrtenApi unit test stubs"""
21 |
22 | def setUp(self):
23 | self.api = AbfahrtenApi() # noqa: E501
24 |
25 | def tearDown(self):
26 | pass
27 |
28 | def test_abfahrten_get1(self):
29 | """Test case for abfahrten_get1
30 |
31 | Liefert die Abfahrten zu einer bestimmten Haltestelle # noqa: E501
32 | """
33 | pass
34 |
35 | def test_abfahrten_get2(self):
36 | """Test case for abfahrten_get2
37 |
38 | Liefert die Abfahrten zu einer bestimmten Haltestelle # noqa: E501
39 | """
40 | pass
41 |
42 |
43 | if __name__ == "__main__":
44 | unittest.main()
45 |
--------------------------------------------------------------------------------
/python-client/test/test_abfahrten_api_response.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.abfahrt_dto import AbfahrtDto
16 | from deutschland.vag.model.metadata import Metadata
17 |
18 | from deutschland import vag
19 |
20 | globals()["AbfahrtDto"] = AbfahrtDto
21 | globals()["Metadata"] = Metadata
22 | from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
23 |
24 |
25 | class TestAbfahrtenAPIResponse(unittest.TestCase):
26 | """AbfahrtenAPIResponse unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testAbfahrtenAPIResponse(self):
35 | """Test AbfahrtenAPIResponse"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = AbfahrtenAPIResponse() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_fahrt_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.fahrt_dto import FahrtDto
16 |
17 | from deutschland import vag
18 |
19 |
20 | class TestFahrtDto(unittest.TestCase):
21 | """FahrtDto unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testFahrtDto(self):
30 | """Test FahrtDto"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = FahrtDto() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_fahrten_api.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import unittest
13 |
14 | from deutschland.vag.api.fahrten_api import FahrtenApi # noqa: E501
15 |
16 | from deutschland import vag
17 |
18 |
19 | class TestFahrtenApi(unittest.TestCase):
20 | """FahrtenApi unit test stubs"""
21 |
22 | def setUp(self):
23 | self.api = FahrtenApi() # noqa: E501
24 |
25 | def tearDown(self):
26 | pass
27 |
28 | def test_fahrten_get(self):
29 | """Test case for fahrten_get
30 |
31 | Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster. # noqa: E501
32 | """
33 | pass
34 |
35 | def test_fahrten_get_fahrt1(self):
36 | """Test case for fahrten_get_fahrt1
37 |
38 | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem aktuellen Betriebstag # noqa: E501
39 | """
40 | pass
41 |
42 | def test_fahrten_get_fahrt2(self):
43 | """Test case for fahrten_get_fahrt2
44 |
45 | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem angegebenen Betriebstag # noqa: E501
46 | """
47 | pass
48 |
49 |
50 | if __name__ == "__main__":
51 | unittest.main()
52 |
--------------------------------------------------------------------------------
/python-client/test/test_fahrten_api_response.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.fahrt_dto import FahrtDto
16 | from deutschland.vag.model.fahrweg_halteposition_dto import FahrwegHaltepositionDto
17 | from deutschland.vag.model.metadata import Metadata
18 |
19 | from deutschland import vag
20 |
21 | globals()["FahrtDto"] = FahrtDto
22 | globals()["FahrwegHaltepositionDto"] = FahrwegHaltepositionDto
23 | globals()["Metadata"] = Metadata
24 | from deutschland.vag.model.fahrten_api_response import FahrtenAPIResponse
25 |
26 |
27 | class TestFahrtenAPIResponse(unittest.TestCase):
28 | """FahrtenAPIResponse unit test stubs"""
29 |
30 | def setUp(self):
31 | pass
32 |
33 | def tearDown(self):
34 | pass
35 |
36 | def testFahrtenAPIResponse(self):
37 | """Test FahrtenAPIResponse"""
38 | # FIXME: construct object with mandatory attributes with example values
39 | # model = FahrtenAPIResponse() # noqa: E501
40 | pass
41 |
42 |
43 | if __name__ == "__main__":
44 | unittest.main()
45 |
--------------------------------------------------------------------------------
/python-client/test/test_fahrweg_halteposition_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.fahrweg_halteposition_dto import FahrwegHaltepositionDto
16 |
17 | from deutschland import vag
18 |
19 |
20 | class TestFahrwegHaltepositionDto(unittest.TestCase):
21 | """FahrwegHaltepositionDto unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testFahrwegHaltepositionDto(self):
30 | """Test FahrwegHaltepositionDto"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = FahrwegHaltepositionDto() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_haltestelle_dto.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.haltestelle_dto import HaltestelleDto
16 |
17 | from deutschland import vag
18 |
19 |
20 | class TestHaltestelleDto(unittest.TestCase):
21 | """HaltestelleDto unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testHaltestelleDto(self):
30 | """Test HaltestelleDto"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = HaltestelleDto() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_haltestellen_api.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import unittest
13 |
14 | from deutschland.vag.api.haltestellen_api import HaltestellenApi # noqa: E501
15 |
16 | from deutschland import vag
17 |
18 |
19 | class TestHaltestellenApi(unittest.TestCase):
20 | """HaltestellenApi unit test stubs"""
21 |
22 | def setUp(self):
23 | self.api = HaltestellenApi() # noqa: E501
24 |
25 | def tearDown(self):
26 | pass
27 |
28 | def test_haltestellen_get_by_location(self):
29 | """Test case for haltestellen_get_by_location
30 |
31 | Liefert die Liste mit den Haltestellen zu der Umkreissuche # noqa: E501
32 | """
33 | pass
34 |
35 | def test_haltestellen_get_by_name(self):
36 | """Test case for haltestellen_get_by_name
37 |
38 | Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional) # noqa: E501
39 | """
40 | pass
41 |
42 |
43 | if __name__ == "__main__":
44 | unittest.main()
45 |
--------------------------------------------------------------------------------
/python-client/test/test_haltestellen_api_response.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.haltestelle_dto import HaltestelleDto
16 | from deutschland.vag.model.metadata import Metadata
17 |
18 | from deutschland import vag
19 |
20 | globals()["HaltestelleDto"] = HaltestelleDto
21 | globals()["Metadata"] = Metadata
22 | from deutschland.vag.model.haltestellen_api_response import HaltestellenAPIResponse
23 |
24 |
25 | class TestHaltestellenAPIResponse(unittest.TestCase):
26 | """HaltestellenAPIResponse unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testHaltestellenAPIResponse(self):
35 | """Test HaltestellenAPIResponse"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = HaltestellenAPIResponse() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_metadata.py:
--------------------------------------------------------------------------------
1 | """
2 | VAG API
3 |
4 | OpenAPI-Dokumentation der API zu start.vag - dem Verkehrs-Aktiengesellschaft (VAG) Abfahrsmonitor mit Echtzeitprognose. Die API gibt Zugriff auf alle Haltestellen, Fahrten und Abfahrten im Gebiet des Verkehrsbund Großraum Nürnberg (VGN). Eine Schnittstellenbeschreibung durch die VAG findet sich auf https://opendata.vag.de/dataset/api-echtzeitauskunft unter Creative CommonsAttribution 4.0 Int veröffentlicht. # noqa: E501
5 |
6 | The version of the OpenAPI document: v2
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.vag.model.metadata import Metadata
16 |
17 | from deutschland import vag
18 |
19 |
20 | class TestMetadata(unittest.TestCase):
21 | """Metadata unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testMetadata(self):
30 | """Test Metadata"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = Metadata() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | envlist = py3
3 |
4 | [testenv]
5 | deps=-r{toxinidir}/requirements.txt
6 | -r{toxinidir}/test-requirements.txt
7 |
8 | commands=
9 | pytest --cov=vag
10 |
--------------------------------------------------------------------------------