├── .github └── workflows │ ├── deutschland_generator.yaml │ ├── openapi_check.yml │ └── schemathesis.yaml ├── CNAME ├── README.md ├── generator_config.yaml ├── index.html ├── openapi.yaml └── python-client ├── .openapi-generator-ignore ├── .openapi-generator ├── FILES └── VERSION ├── README.md ├── deutschland └── pegel_online │ ├── __init__.py │ ├── api │ ├── __init__.py │ ├── measurement_api.py │ ├── station_api.py │ └── water_api.py │ ├── api_client.py │ ├── apis │ └── __init__.py │ ├── configuration.py │ ├── exceptions.py │ ├── model │ ├── __init__.py │ ├── comment.py │ ├── comment_inner.py │ ├── current_measurement.py │ ├── measurement_result.py │ ├── measurement_result_inner.py │ ├── station.py │ ├── station_overview_result.py │ ├── station_water.py │ ├── timeseries.py │ ├── timeseries_gauge_zero.py │ ├── timeseries_not_found.py │ └── water_result.py │ ├── model_utils.py │ ├── models │ └── __init__.py │ └── rest.py ├── docs ├── Comment.md ├── CommentInner.md ├── CurrentMeasurement.md ├── MeasurementApi.md ├── MeasurementResult.md ├── MeasurementResultInner.md ├── Station.md ├── StationApi.md ├── StationOverviewResult.md ├── StationWater.md ├── Timeseries.md ├── TimeseriesGaugeZero.md ├── TimeseriesNotFound.md ├── WaterApi.md └── WaterResult.md ├── pyproject.toml ├── requirements.txt ├── sphinx-docs ├── Makefile ├── conf.py ├── index.rst ├── make.bat └── source │ ├── modules.rst │ ├── pegel_online.api.rst │ ├── pegel_online.apis.rst │ ├── pegel_online.model.rst │ ├── pegel_online.models.rst │ └── pegel_online.rst ├── test-requirements.txt ├── test ├── __init__.py ├── test_comment.py ├── test_comment_inner.py ├── test_current_measurement.py ├── test_measurement_api.py ├── test_measurement_result.py ├── test_measurement_result_inner.py ├── test_station.py ├── test_station_api.py ├── test_station_overview_result.py ├── test_station_water.py ├── test_timeseries.py ├── test_timeseries_gauge_zero.py ├── test_timeseries_not_found.py ├── test_water_api.py └── test_water_result.py └── tox.ini /.github/workflows/deutschland_generator.yaml: -------------------------------------------------------------------------------- 1 | on: [push] 2 | jobs: 3 | deutschland_generation: 4 | name: "Deutschland Generation" 5 | runs-on: ubuntu-latest 6 | strategy: 7 | fail-fast: false 8 | matrix: 9 | python-version: ["3.11.1"] 10 | steps: 11 | - uses: actions/checkout@v2 12 | 13 | # Create default .spectral.yaml file used for linting if its not existing already 14 | - name: "Create spectral file if it not exists" 15 | continue-on-error: true 16 | run: | 17 | set -C; echo "extends: spectral:oas" > .spectral.yaml 18 | 19 | # Runs a single command using the runners shell 20 | - name: "Lint file" 21 | uses: stoplightio/spectral-action@latest 22 | with: 23 | file_glob: "openapi.yaml" 24 | 25 | - name: "Generate deutschland code" 26 | uses: wirthual/deutschland-generator-action@latest 27 | with: 28 | openapi-file: ${{ github.workspace }}/openapi.yaml 29 | commit-to-git: ${{ github.repository_owner == 'bundesAPI'}} 30 | upload-to-pypi: ${{ github.repository_owner == 'bundesAPI'}} 31 | upload-to-testpypi: false 32 | pypi-token: ${{ secrets.PYPI_PRODUCTION }} 33 | testpypi-token: ${{ secrets.PYPI_TEST }} 34 | python-version: ${{ matrix.python-version }} 35 | -------------------------------------------------------------------------------- /.github/workflows/openapi_check.yml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | jobs: 3 | openapi_check: 4 | name: "OpenAPI check" 5 | runs-on: ubuntu-latest 6 | steps: 7 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 8 | - uses: actions/checkout@v2 9 | 10 | # Create default .spectral.yaml file used for linting if its not existing already 11 | - name: "Create spectral file if it not exists" 12 | continue-on-error: true 13 | run: | 14 | set -C; echo "extends: spectral:oas" > .spectral.yaml 15 | # Run Spectral 16 | - uses: stoplightio/spectral-action@latest 17 | with: 18 | file_glob: openapi.yaml 19 | spectral_ruleset: .spectral.yaml -------------------------------------------------------------------------------- /.github/workflows/schemathesis.yaml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | jobs: 3 | schemathesis: 4 | name: "Perform schemathesis checks" 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v3 8 | - uses: actions/setup-python@v4 9 | with: 10 | python-version: '3.8' 11 | 12 | - run: pip install schemathesis 13 | 14 | - name: "Extract base url from openapi.yaml" 15 | uses: mikefarah/yq@master 16 | with: 17 | cmd: echo "base_url=$(yq -r .servers[].url openapi.yaml)" >> $GITHUB_ENV 18 | 19 | - run: schemathesis run ./openapi.yaml --base-url "${{ env.base_url }}" --checks all --hypothesis-phases=explicit 20 | 21 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | pegel-online.api.bund.dev -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pegel-online-api 2 | Pegelstände der Messstellen des bundesweiten Messstellennetzes der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. 3 | 4 | Die API stellt drei verschiedene Ressourcen zur Verfügung: _Station_, _Measurement_, _Water_. 5 | 6 | ## Dokumentation 7 | 8 | Die OpenAPI Specification für die API befindet sich auf [pegel-online.api.bund.dev](https://pegel-online.api.bund.dev/). 9 | 10 | ### Authentifizierung / Autorisierung / API Limitierung 11 | 12 | Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. 13 | 14 | -------------------------------------------------------------------------------- /generator_config.yaml: -------------------------------------------------------------------------------- 1 | templateDir: deutschland_templates # For local use: ./local/deutschland_templates 2 | additionalProperties: 3 | packageName: "pegel_online" 4 | infoName: "BundesAPI" 5 | infoEmail: "kontakt@bund.dev" 6 | packageVersion: 0.1.1 7 | packageUrl: "https://github.com/bundesAPI/pegel-online-api" 8 | namespace: "deutschland" 9 | docLanguage: "de" 10 | gitHost: "github.com" 11 | gitUserId: "bundesAPI" 12 | gitRepoId: "pegel-online-api" 13 | files: 14 | pyproject.mustache: 15 | destinationFilename: pyproject.toml 16 | templateType: SupportingFiles 17 | requirements.txt: {} 18 | create_doc.mustache: 19 | destinationFilename: create_doc.py 20 | templateType: SupportingFiles 21 | rename_generated_code.mustache: 22 | destinationFilename: rename_generated_code.py 23 | templateType: SupportingFiles 24 | README.mustache: 25 | destinationFilename: README.md 26 | templateType: SupportingFiles 27 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Wasserstraßen- und Schifffahrtsverwaltung des Bundes - Messwerte des bundesweiten gewässerkundlichen 9 | Messstellennetz. 10 | 11 | 12 |
[DE]/[EN]
13 | 14 |
15 | 16 | 17 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /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/Comment.md 8 | docs/CommentInner.md 9 | docs/CurrentMeasurement.md 10 | docs/MeasurementApi.md 11 | docs/MeasurementResult.md 12 | docs/MeasurementResultInner.md 13 | docs/Station.md 14 | docs/StationApi.md 15 | docs/StationOverviewResult.md 16 | docs/StationWater.md 17 | docs/Timeseries.md 18 | docs/TimeseriesGaugeZero.md 19 | docs/TimeseriesNotFound.md 20 | docs/WaterApi.md 21 | docs/WaterResult.md 22 | git_push.sh 23 | pegel_online/__init__.py 24 | pegel_online/api/__init__.py 25 | pegel_online/api/measurement_api.py 26 | pegel_online/api/station_api.py 27 | pegel_online/api/water_api.py 28 | pegel_online/api_client.py 29 | pegel_online/apis/__init__.py 30 | pegel_online/configuration.py 31 | pegel_online/exceptions.py 32 | pegel_online/model/__init__.py 33 | pegel_online/model/comment.py 34 | pegel_online/model/comment_inner.py 35 | pegel_online/model/current_measurement.py 36 | pegel_online/model/measurement_result.py 37 | pegel_online/model/measurement_result_inner.py 38 | pegel_online/model/station.py 39 | pegel_online/model/station_overview_result.py 40 | pegel_online/model/station_water.py 41 | pegel_online/model/timeseries.py 42 | pegel_online/model/timeseries_gauge_zero.py 43 | pegel_online/model/timeseries_not_found.py 44 | pegel_online/model/water_result.py 45 | pegel_online/model_utils.py 46 | pegel_online/models/__init__.py 47 | pegel_online/rest.py 48 | pyproject.toml 49 | rename_generated_code.py 50 | requirements.txt 51 | requirements.txt 52 | setup.cfg 53 | setup.py 54 | test-requirements.txt 55 | test/__init__.py 56 | test/test_comment.py 57 | test/test_comment_inner.py 58 | test/test_current_measurement.py 59 | test/test_measurement_api.py 60 | test/test_measurement_result.py 61 | test/test_measurement_result_inner.py 62 | test/test_station.py 63 | test/test_station_api.py 64 | test/test_station_overview_result.py 65 | test/test_station_water.py 66 | test/test_timeseries.py 67 | test/test_timeseries_gauge_zero.py 68 | test/test_timeseries_not_found.py 69 | test/test_water_api.py 70 | test/test_water_result.py 71 | tox.ini 72 | -------------------------------------------------------------------------------- /python-client/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.0 -------------------------------------------------------------------------------- /python-client/README.md: -------------------------------------------------------------------------------- 1 | # pegel-online 2 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. 3 | 4 | Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. 5 | ### Authentifizierung / Autorisierung / API Limitierung 6 | Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. 7 | ### Allgemeine Query-Parameter 8 | Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). 9 | - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. 10 | - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. 11 | - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. 12 | 13 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: 14 | 15 | - API version: 1.0.0 16 | - Package version: 0.1.1 17 | - Build package: org.openapitools.codegen.languages.PythonClientCodegen 18 | For more information, please visit [https://www.pegelonline.wsv.de/](https://www.pegelonline.wsv.de/) 19 | 20 | ## Requirements. 21 | 22 | Python >= 3.6 23 | 24 | ## Installation & Usage 25 | ### pip install 26 | 27 | ```sh 28 | pip install deutschland[pegel_online] 29 | ``` 30 | 31 | ### poetry install 32 | 33 | ```sh 34 | poetry add deutschland -E pegel_online 35 | ``` 36 | 37 | ### Setuptools 38 | 39 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools). 40 | 41 | ```sh 42 | python setup.py install --user 43 | ``` 44 | (or `sudo python setup.py install` to install the package for all users) 45 | 46 | ## Usage 47 | 48 | Import the package: 49 | ```python 50 | from deutschland import pegel_online 51 | ``` 52 | 53 | ## Getting Started 54 | 55 | Please follow the [installation procedure](#installation--usage) and then run the following: 56 | 57 | ```python 58 | 59 | import time 60 | from deutschland import pegel_online 61 | from pprint import pprint 62 | from deutschland.pegel_online.api import measurement_api 63 | from deutschland.pegel_online.model.measurement_result import MeasurementResult 64 | from deutschland.pegel_online.model.timeseries_not_found import TimeseriesNotFound 65 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 66 | # See configuration.py for a list of all supported configuration parameters. 67 | configuration = pegel_online.Configuration( 68 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 69 | ) 70 | 71 | 72 | 73 | # Enter a context with an instance of the API client 74 | with pegel_online.ApiClient(configuration) as api_client: 75 | # Create an instance of the API class 76 | api_instance = measurement_api.MeasurementApi(api_client) 77 | station = "593647aa-9fea-43ec-a7d6-6476a76ae868" # str | UUID / Name / Pegelnummer der Station. 78 | timeseries = "W" # str | timeseries shortname 79 | start = "2022-02-06T09:00:00+01:00" # str | Zeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Angabe eines Datums oder einer Period (_P_, z.B. 'P8D' für die Messwerte der letzten 8 Tage) sind möglich. (optional) 80 | end = "" # str | Endzeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Kann auch leer gelassen werden, dann wird automatisch der aktuelle Zeitstempel verwendet. (optional) 81 | 82 | try: 83 | # Zugriff auf die Ressource Measurement 84 | api_response = api_instance.get_measurement_by_station(station, timeseries, start=start, end=end) 85 | pprint(api_response) 86 | except pegel_online.ApiException as e: 87 | print("Exception when calling MeasurementApi->get_measurement_by_station: %s\n" % e) 88 | ``` 89 | 90 | ## Documentation for API Endpoints 91 | 92 | All URIs are relative to *https://www.pegelonline.wsv.de/webservices/rest-api/v2* 93 | 94 | Class | Method | HTTP request | Description 95 | ------------ | ------------- | ------------- | ------------- 96 | *MeasurementApi* | [**get_measurement_by_station**](docs/MeasurementApi.md#get_measurement_by_station) | **GET** /stations/{station}/{timeseries}/measurements.json | Zugriff auf die Ressource Measurement 97 | *MeasurementApi* | [**get_measurement_diagram_by_station**](docs/MeasurementApi.md#get_measurement_diagram_by_station) | **GET** /stations/{station}/{timeseries}/measurements.png | Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG) 98 | *StationApi* | [**get_stations**](docs/StationApi.md#get_stations) | **GET** /stations.json | Übersicht über alle Stationen (Pegel) 99 | *StationApi* | [**get_stations_by_id**](docs/StationApi.md#get_stations_by_id) | **GET** /stations/{station}.json | Zugriff auf eine bestimmte Station (Pegel) 100 | *WaterApi* | [**get_current_measurment_by_station**](docs/WaterApi.md#get_current_measurment_by_station) | **GET** /stations/{station}/{timeseries}.json | Zugriff auf eine Timeseries 101 | *WaterApi* | [**get_waters**](docs/WaterApi.md#get_waters) | **GET** /waters.json | Zugriff auf die Ressource Water 102 | 103 | 104 | ## Documentation For Models 105 | 106 | - [Comment](docs/Comment.md) 107 | - [CommentInner](docs/CommentInner.md) 108 | - [CurrentMeasurement](docs/CurrentMeasurement.md) 109 | - [MeasurementResult](docs/MeasurementResult.md) 110 | - [MeasurementResultInner](docs/MeasurementResultInner.md) 111 | - [Station](docs/Station.md) 112 | - [StationOverviewResult](docs/StationOverviewResult.md) 113 | - [StationWater](docs/StationWater.md) 114 | - [Timeseries](docs/Timeseries.md) 115 | - [TimeseriesGaugeZero](docs/TimeseriesGaugeZero.md) 116 | - [TimeseriesNotFound](docs/TimeseriesNotFound.md) 117 | - [WaterResult](docs/WaterResult.md) 118 | 119 | 120 | ## Documentation For Authorization 121 | 122 | All endpoints do not require authorization. 123 | 124 | ## Author 125 | 126 | kontakt@bund.dev 127 | 128 | 129 | ## Notes for Large OpenAPI documents 130 | If the OpenAPI document is large, imports in pegel_online.apis and pegel_online.models may fail with a 131 | RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: 132 | 133 | Solution 1: 134 | Use specific imports for apis and models like: 135 | - `from deutschland.pegel_online.api.default_api import DefaultApi` 136 | - `from deutschland.pegel_online.model.pet import Pet` 137 | 138 | Solution 2: 139 | Before importing the package, adjust the maximum recursion limit as shown below: 140 | ``` 141 | import sys 142 | sys.setrecursionlimit(1500) 143 | from deutschland import pegel_online 144 | from deutschland.pegel_online.apis import * 145 | from deutschland.pegel_online.models import * 146 | ``` 147 | 148 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | """ 4 | Pegel-Online API 5 | 6 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 7 | 8 | The version of the OpenAPI document: 1.0.0 9 | Contact: kontakt@bund.dev 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | __version__ = "0.1.1" 15 | 16 | # import ApiClient 17 | from deutschland.pegel_online.api_client import ApiClient 18 | 19 | # import Configuration 20 | from deutschland.pegel_online.configuration import Configuration 21 | 22 | # import exceptions 23 | from deutschland.pegel_online.exceptions import ( 24 | ApiAttributeError, 25 | ApiException, 26 | ApiKeyError, 27 | ApiTypeError, 28 | ApiValueError, 29 | OpenApiException, 30 | ) 31 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/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.pegel_online.apis import MeasurementApi 4 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/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.pegel_online.api.measurement_api import MeasurementApi 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.pegel_online.api.measurement_api import MeasurementApi 17 | from deutschland.pegel_online.api.station_api import StationApi 18 | from deutschland.pegel_online.api.water_api import WaterApi 19 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/exceptions.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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/pegel_online/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.pegel_online.models import ModelA, ModelB 6 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/model/comment.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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.pegel_online.model.comment_inner import CommentInner 35 | 36 | globals()["CommentInner"] = CommentInner 37 | 38 | 39 | class Comment(ModelSimple): 40 | """NOTE: This class is auto generated by OpenAPI Generator. 41 | Ref: https://openapi-generator.tech 42 | 43 | Do not edit the class manually. 44 | 45 | Attributes: 46 | allowed_values (dict): The key is the tuple path to the attribute 47 | and the for var_name this is (var_name,). The value is a dict 48 | with a capitalized key describing the allowed value and an allowed 49 | value. These dicts store the allowed enum values. 50 | validations (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 | that stores validations for max_length, min_length, max_items, 53 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 54 | inclusive_minimum, and regex. 55 | additional_properties_type (tuple): A tuple of classes accepted 56 | as additional properties values. 57 | """ 58 | 59 | allowed_values = {} 60 | 61 | validations = {} 62 | 63 | additional_properties_type = None 64 | 65 | _nullable = False 66 | 67 | @cached_property 68 | def openapi_types(): 69 | """ 70 | This must be a method because a model may have properties that are 71 | of type self, this must run after the class is loaded 72 | 73 | Returns 74 | openapi_types (dict): The key is attribute name 75 | and the value is attribute type. 76 | """ 77 | lazy_import() 78 | return { 79 | "value": ([CommentInner],), 80 | } 81 | 82 | @cached_property 83 | def discriminator(): 84 | return None 85 | 86 | attribute_map = {} 87 | 88 | read_only_vars = set() 89 | 90 | _composed_schemas = None 91 | 92 | required_properties = set( 93 | [ 94 | "_data_store", 95 | "_check_type", 96 | "_spec_property_naming", 97 | "_path_to_item", 98 | "_configuration", 99 | "_visited_composed_classes", 100 | ] 101 | ) 102 | 103 | @convert_js_args_to_python_args 104 | def __init__(self, *args, **kwargs): 105 | """Comment - a model defined in OpenAPI 106 | 107 | Note that value can be passed either in args or in kwargs, but not in both. 108 | 109 | Args: 110 | args[0] ([CommentInner]): Liegt z.B. eine Fehlfunktion oder ein Ausfall an der Messstelle vor, so ist dies hier mit einer Textbeschreibung erläutert.. # noqa: E501 111 | 112 | Keyword Args: 113 | value ([CommentInner]): Liegt z.B. eine Fehlfunktion oder ein Ausfall an der Messstelle vor, so ist dies hier mit einer Textbeschreibung erläutert.. # noqa: E501 114 | _check_type (bool): if True, values for parameters in openapi_types 115 | will be type checked and a TypeError will be 116 | raised if the wrong type is input. 117 | Defaults to True 118 | _path_to_item (tuple/list): This is a list of keys or values to 119 | drill down to the model in received_data 120 | when deserializing a response 121 | _spec_property_naming (bool): True if the variable names in the input data 122 | are serialized names, as specified in the OpenAPI document. 123 | False if the variable names in the input data 124 | are pythonic names, e.g. snake case (default) 125 | _configuration (Configuration): the instance to use when 126 | deserializing a file_type parameter. 127 | If passed, type conversion is attempted 128 | If omitted no type conversion is done. 129 | _visited_composed_classes (tuple): This stores a tuple of 130 | classes that we have traveled through so that 131 | if we see that class again we will not use its 132 | discriminator again. 133 | When traveling through a discriminator, the 134 | composed schema that is 135 | is traveled through is added to this set. 136 | For example if Animal has a discriminator 137 | petType and we pass in "Dog", and the class Dog 138 | allOf includes Animal, we move through Animal 139 | once using the discriminator, and pick Dog. 140 | Then in Dog, we will make an instance of the 141 | Animal class but this time we won't travel 142 | through its discriminator because we passed in 143 | _visited_composed_classes = (Animal,) 144 | """ 145 | # required up here when default value is not given 146 | _path_to_item = kwargs.pop("_path_to_item", ()) 147 | 148 | if "value" in kwargs: 149 | value = kwargs.pop("value") 150 | elif args: 151 | args = list(args) 152 | value = args.pop(0) 153 | else: 154 | raise ApiTypeError( 155 | "value is required, but not passed in args or kwargs and doesn't have default", 156 | path_to_item=_path_to_item, 157 | valid_classes=(self.__class__,), 158 | ) 159 | 160 | _check_type = kwargs.pop("_check_type", True) 161 | _spec_property_naming = kwargs.pop("_spec_property_naming", False) 162 | _configuration = kwargs.pop("_configuration", None) 163 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 164 | 165 | if args: 166 | for arg in args: 167 | if isinstance(arg, dict): 168 | kwargs.update(arg) 169 | else: 170 | raise ApiTypeError( 171 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 172 | % ( 173 | args, 174 | self.__class__.__name__, 175 | ), 176 | path_to_item=_path_to_item, 177 | valid_classes=(self.__class__,), 178 | ) 179 | 180 | self._data_store = {} 181 | self._check_type = _check_type 182 | self._spec_property_naming = _spec_property_naming 183 | self._path_to_item = _path_to_item 184 | self._configuration = _configuration 185 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 186 | self.value = value 187 | if kwargs: 188 | raise ApiTypeError( 189 | "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." 190 | % ( 191 | kwargs, 192 | self.__class__.__name__, 193 | ), 194 | path_to_item=_path_to_item, 195 | valid_classes=(self.__class__,), 196 | ) 197 | 198 | @classmethod 199 | @convert_js_args_to_python_args 200 | def _from_openapi_data(cls, *args, **kwargs): 201 | """Comment - a model defined in OpenAPI 202 | 203 | Note that value can be passed either in args or in kwargs, but not in both. 204 | 205 | Args: 206 | args[0] ([CommentInner]): Liegt z.B. eine Fehlfunktion oder ein Ausfall an der Messstelle vor, so ist dies hier mit einer Textbeschreibung erläutert.. # noqa: E501 207 | 208 | Keyword Args: 209 | value ([CommentInner]): Liegt z.B. eine Fehlfunktion oder ein Ausfall an der Messstelle vor, so ist dies hier mit einer Textbeschreibung erläutert.. # noqa: E501 210 | _check_type (bool): if True, values for parameters in openapi_types 211 | will be type checked and a TypeError will be 212 | raised if the wrong type is input. 213 | Defaults to True 214 | _path_to_item (tuple/list): This is a list of keys or values to 215 | drill down to the model in received_data 216 | when deserializing a response 217 | _spec_property_naming (bool): True if the variable names in the input data 218 | are serialized names, as specified in the OpenAPI document. 219 | False if the variable names in the input data 220 | are pythonic names, e.g. snake case (default) 221 | _configuration (Configuration): the instance to use when 222 | deserializing a file_type parameter. 223 | If passed, type conversion is attempted 224 | If omitted no type conversion is done. 225 | _visited_composed_classes (tuple): This stores a tuple of 226 | classes that we have traveled through so that 227 | if we see that class again we will not use its 228 | discriminator again. 229 | When traveling through a discriminator, the 230 | composed schema that is 231 | is traveled through is added to this set. 232 | For example if Animal has a discriminator 233 | petType and we pass in "Dog", and the class Dog 234 | allOf includes Animal, we move through Animal 235 | once using the discriminator, and pick Dog. 236 | Then in Dog, we will make an instance of the 237 | Animal class but this time we won't travel 238 | through its discriminator because we passed in 239 | _visited_composed_classes = (Animal,) 240 | """ 241 | # required up here when default value is not given 242 | _path_to_item = kwargs.pop("_path_to_item", ()) 243 | 244 | self = super(OpenApiModel, cls).__new__(cls) 245 | 246 | if "value" in kwargs: 247 | value = kwargs.pop("value") 248 | elif args: 249 | args = list(args) 250 | value = args.pop(0) 251 | else: 252 | raise ApiTypeError( 253 | "value is required, but not passed in args or kwargs and doesn't have default", 254 | path_to_item=_path_to_item, 255 | valid_classes=(self.__class__,), 256 | ) 257 | 258 | _check_type = kwargs.pop("_check_type", True) 259 | _spec_property_naming = kwargs.pop("_spec_property_naming", False) 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 | self.value = value 285 | if kwargs: 286 | raise ApiTypeError( 287 | "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." 288 | % ( 289 | kwargs, 290 | self.__class__.__name__, 291 | ), 292 | path_to_item=_path_to_item, 293 | valid_classes=(self.__class__,), 294 | ) 295 | 296 | return self 297 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/model/comment_inner.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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 CommentInner(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 | "short_description": (str,), # noqa: E501 93 | "long_description": (str,), # noqa: E501 94 | } 95 | 96 | @cached_property 97 | def discriminator(): 98 | return None 99 | 100 | attribute_map = { 101 | "short_description": "shortDescription", # noqa: E501 102 | "long_description": "longDescription", # 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 | """CommentInner - 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 | short_description (str): Kurzbeschreibung, maximal 55 Zeichen.. [optional] # noqa: E501 146 | long_description (str): Langbeschreibung, maximal 500 Zeichen.. [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 | """CommentInner - 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 | short_description (str): Kurzbeschreibung, maximal 55 Zeichen.. [optional] # noqa: E501 238 | long_description (str): Langbeschreibung, maximal 500 Zeichen.. [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/pegel_online/model/measurement_result.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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.pegel_online.model.measurement_result_inner import ( 35 | MeasurementResultInner, 36 | ) 37 | 38 | globals()["MeasurementResultInner"] = MeasurementResultInner 39 | 40 | 41 | class MeasurementResult(ModelSimple): 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 | validations (dict): The key is the tuple path to the attribute 53 | and the for var_name this is (var_name,). The value is a dict 54 | that stores validations for max_length, min_length, max_items, 55 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 56 | inclusive_minimum, and regex. 57 | additional_properties_type (tuple): A tuple of classes accepted 58 | as additional properties values. 59 | """ 60 | 61 | allowed_values = {} 62 | 63 | validations = {} 64 | 65 | additional_properties_type = None 66 | 67 | _nullable = False 68 | 69 | @cached_property 70 | def openapi_types(): 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 | Returns 76 | openapi_types (dict): The key is attribute name 77 | and the value is attribute type. 78 | """ 79 | lazy_import() 80 | return { 81 | "value": ([MeasurementResultInner],), 82 | } 83 | 84 | @cached_property 85 | def discriminator(): 86 | return None 87 | 88 | attribute_map = {} 89 | 90 | read_only_vars = set() 91 | 92 | _composed_schemas = None 93 | 94 | required_properties = set( 95 | [ 96 | "_data_store", 97 | "_check_type", 98 | "_spec_property_naming", 99 | "_path_to_item", 100 | "_configuration", 101 | "_visited_composed_classes", 102 | ] 103 | ) 104 | 105 | @convert_js_args_to_python_args 106 | def __init__(self, *args, **kwargs): 107 | """MeasurementResult - a model defined in OpenAPI 108 | 109 | Note that value can be passed either in args or in kwargs, but not in both. 110 | 111 | Args: 112 | args[0] ([MeasurementResultInner]): # noqa: E501 113 | 114 | Keyword Args: 115 | value ([MeasurementResultInner]): # noqa: E501 116 | _check_type (bool): if True, values for parameters in openapi_types 117 | will be type checked and a TypeError will be 118 | raised if the wrong type is input. 119 | Defaults to True 120 | _path_to_item (tuple/list): This is a list of keys or values to 121 | drill down to the model in received_data 122 | when deserializing a response 123 | _spec_property_naming (bool): True if the variable names in the input data 124 | are serialized names, as specified in the OpenAPI document. 125 | False if the variable names in the input data 126 | are pythonic names, e.g. snake case (default) 127 | _configuration (Configuration): the instance to use when 128 | deserializing a file_type parameter. 129 | If passed, type conversion is attempted 130 | If omitted no type conversion is done. 131 | _visited_composed_classes (tuple): This stores a tuple of 132 | classes that we have traveled through so that 133 | if we see that class again we will not use its 134 | discriminator again. 135 | When traveling through a discriminator, the 136 | composed schema that is 137 | is traveled through is added to this set. 138 | For example if Animal has a discriminator 139 | petType and we pass in "Dog", and the class Dog 140 | allOf includes Animal, we move through Animal 141 | once using the discriminator, and pick Dog. 142 | Then in Dog, we will make an instance of the 143 | Animal class but this time we won't travel 144 | through its discriminator because we passed in 145 | _visited_composed_classes = (Animal,) 146 | """ 147 | # required up here when default value is not given 148 | _path_to_item = kwargs.pop("_path_to_item", ()) 149 | 150 | if "value" in kwargs: 151 | value = kwargs.pop("value") 152 | elif args: 153 | args = list(args) 154 | value = args.pop(0) 155 | else: 156 | raise ApiTypeError( 157 | "value is required, but not passed in args or kwargs and doesn't have default", 158 | path_to_item=_path_to_item, 159 | valid_classes=(self.__class__,), 160 | ) 161 | 162 | _check_type = kwargs.pop("_check_type", True) 163 | _spec_property_naming = kwargs.pop("_spec_property_naming", False) 164 | _configuration = kwargs.pop("_configuration", None) 165 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 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 | self.value = value 189 | if kwargs: 190 | raise ApiTypeError( 191 | "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." 192 | % ( 193 | kwargs, 194 | self.__class__.__name__, 195 | ), 196 | path_to_item=_path_to_item, 197 | valid_classes=(self.__class__,), 198 | ) 199 | 200 | @classmethod 201 | @convert_js_args_to_python_args 202 | def _from_openapi_data(cls, *args, **kwargs): 203 | """MeasurementResult - a model defined in OpenAPI 204 | 205 | Note that value can be passed either in args or in kwargs, but not in both. 206 | 207 | Args: 208 | args[0] ([MeasurementResultInner]): # noqa: E501 209 | 210 | Keyword Args: 211 | value ([MeasurementResultInner]): # noqa: E501 212 | _check_type (bool): if True, values for parameters in openapi_types 213 | will be type checked and a TypeError will be 214 | raised if the wrong type is input. 215 | Defaults to True 216 | _path_to_item (tuple/list): This is a list of keys or values to 217 | drill down to the model in received_data 218 | when deserializing a response 219 | _spec_property_naming (bool): True if the variable names in the input data 220 | are serialized names, as specified in the OpenAPI document. 221 | False if the variable names in the input data 222 | are pythonic names, e.g. snake case (default) 223 | _configuration (Configuration): the instance to use when 224 | deserializing a file_type parameter. 225 | If passed, type conversion is attempted 226 | If omitted no type conversion is done. 227 | _visited_composed_classes (tuple): This stores a tuple of 228 | classes that we have traveled through so that 229 | if we see that class again we will not use its 230 | discriminator again. 231 | When traveling through a discriminator, the 232 | composed schema that is 233 | is traveled through is added to this set. 234 | For example if Animal has a discriminator 235 | petType and we pass in "Dog", and the class Dog 236 | allOf includes Animal, we move through Animal 237 | once using the discriminator, and pick Dog. 238 | Then in Dog, we will make an instance of the 239 | Animal class but this time we won't travel 240 | through its discriminator because we passed in 241 | _visited_composed_classes = (Animal,) 242 | """ 243 | # required up here when default value is not given 244 | _path_to_item = kwargs.pop("_path_to_item", ()) 245 | 246 | self = super(OpenApiModel, cls).__new__(cls) 247 | 248 | if "value" in kwargs: 249 | value = kwargs.pop("value") 250 | elif args: 251 | args = list(args) 252 | value = args.pop(0) 253 | else: 254 | raise ApiTypeError( 255 | "value is required, but not passed in args or kwargs and doesn't have default", 256 | path_to_item=_path_to_item, 257 | valid_classes=(self.__class__,), 258 | ) 259 | 260 | _check_type = kwargs.pop("_check_type", True) 261 | _spec_property_naming = kwargs.pop("_spec_property_naming", False) 262 | _configuration = kwargs.pop("_configuration", None) 263 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 264 | 265 | if args: 266 | for arg in args: 267 | if isinstance(arg, dict): 268 | kwargs.update(arg) 269 | else: 270 | raise ApiTypeError( 271 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 272 | % ( 273 | args, 274 | self.__class__.__name__, 275 | ), 276 | path_to_item=_path_to_item, 277 | valid_classes=(self.__class__,), 278 | ) 279 | 280 | self._data_store = {} 281 | self._check_type = _check_type 282 | self._spec_property_naming = _spec_property_naming 283 | self._path_to_item = _path_to_item 284 | self._configuration = _configuration 285 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 286 | self.value = value 287 | if kwargs: 288 | raise ApiTypeError( 289 | "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." 290 | % ( 291 | kwargs, 292 | self.__class__.__name__, 293 | ), 294 | path_to_item=_path_to_item, 295 | valid_classes=(self.__class__,), 296 | ) 297 | 298 | return self 299 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/model/measurement_result_inner.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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 MeasurementResultInner(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 | "timestamp": (str,), # noqa: E501 93 | "value": (float,), # noqa: E501 94 | } 95 | 96 | @cached_property 97 | def discriminator(): 98 | return None 99 | 100 | attribute_map = { 101 | "timestamp": "timestamp", # noqa: E501 102 | "value": "value", # 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 | """MeasurementResultInner - 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 | timestamp (str): Zeitpunkt im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format codiert. [optional] # noqa: E501 146 | value (float): Wert als Dezimalzahl in der Einheit, welche durch die Timeseries der Station vorgegeben ist.. [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 | """MeasurementResultInner - 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 | timestamp (str): Zeitpunkt im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format codiert. [optional] # noqa: E501 238 | value (float): Wert als Dezimalzahl in der Einheit, welche durch die Timeseries der Station vorgegeben ist.. [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/pegel_online/model/station_overview_result.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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.pegel_online.model.station import Station 35 | 36 | globals()["Station"] = Station 37 | 38 | 39 | class StationOverviewResult(ModelSimple): 40 | """NOTE: This class is auto generated by OpenAPI Generator. 41 | Ref: https://openapi-generator.tech 42 | 43 | Do not edit the class manually. 44 | 45 | Attributes: 46 | allowed_values (dict): The key is the tuple path to the attribute 47 | and the for var_name this is (var_name,). The value is a dict 48 | with a capitalized key describing the allowed value and an allowed 49 | value. These dicts store the allowed enum values. 50 | validations (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 | that stores validations for max_length, min_length, max_items, 53 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 54 | inclusive_minimum, and regex. 55 | additional_properties_type (tuple): A tuple of classes accepted 56 | as additional properties values. 57 | """ 58 | 59 | allowed_values = {} 60 | 61 | validations = {} 62 | 63 | additional_properties_type = None 64 | 65 | _nullable = False 66 | 67 | @cached_property 68 | def openapi_types(): 69 | """ 70 | This must be a method because a model may have properties that are 71 | of type self, this must run after the class is loaded 72 | 73 | Returns 74 | openapi_types (dict): The key is attribute name 75 | and the value is attribute type. 76 | """ 77 | lazy_import() 78 | return { 79 | "value": ([Station],), 80 | } 81 | 82 | @cached_property 83 | def discriminator(): 84 | return None 85 | 86 | attribute_map = {} 87 | 88 | read_only_vars = set() 89 | 90 | _composed_schemas = None 91 | 92 | required_properties = set( 93 | [ 94 | "_data_store", 95 | "_check_type", 96 | "_spec_property_naming", 97 | "_path_to_item", 98 | "_configuration", 99 | "_visited_composed_classes", 100 | ] 101 | ) 102 | 103 | @convert_js_args_to_python_args 104 | def __init__(self, *args, **kwargs): 105 | """StationOverviewResult - a model defined in OpenAPI 106 | 107 | Note that value can be passed either in args or in kwargs, but not in both. 108 | 109 | Args: 110 | args[0] ([Station]): # noqa: E501 111 | 112 | Keyword Args: 113 | value ([Station]): # noqa: E501 114 | _check_type (bool): if True, values for parameters in openapi_types 115 | will be type checked and a TypeError will be 116 | raised if the wrong type is input. 117 | Defaults to True 118 | _path_to_item (tuple/list): This is a list of keys or values to 119 | drill down to the model in received_data 120 | when deserializing a response 121 | _spec_property_naming (bool): True if the variable names in the input data 122 | are serialized names, as specified in the OpenAPI document. 123 | False if the variable names in the input data 124 | are pythonic names, e.g. snake case (default) 125 | _configuration (Configuration): the instance to use when 126 | deserializing a file_type parameter. 127 | If passed, type conversion is attempted 128 | If omitted no type conversion is done. 129 | _visited_composed_classes (tuple): This stores a tuple of 130 | classes that we have traveled through so that 131 | if we see that class again we will not use its 132 | discriminator again. 133 | When traveling through a discriminator, the 134 | composed schema that is 135 | is traveled through is added to this set. 136 | For example if Animal has a discriminator 137 | petType and we pass in "Dog", and the class Dog 138 | allOf includes Animal, we move through Animal 139 | once using the discriminator, and pick Dog. 140 | Then in Dog, we will make an instance of the 141 | Animal class but this time we won't travel 142 | through its discriminator because we passed in 143 | _visited_composed_classes = (Animal,) 144 | """ 145 | # required up here when default value is not given 146 | _path_to_item = kwargs.pop("_path_to_item", ()) 147 | 148 | if "value" in kwargs: 149 | value = kwargs.pop("value") 150 | elif args: 151 | args = list(args) 152 | value = args.pop(0) 153 | else: 154 | raise ApiTypeError( 155 | "value is required, but not passed in args or kwargs and doesn't have default", 156 | path_to_item=_path_to_item, 157 | valid_classes=(self.__class__,), 158 | ) 159 | 160 | _check_type = kwargs.pop("_check_type", True) 161 | _spec_property_naming = kwargs.pop("_spec_property_naming", False) 162 | _configuration = kwargs.pop("_configuration", None) 163 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 164 | 165 | if args: 166 | for arg in args: 167 | if isinstance(arg, dict): 168 | kwargs.update(arg) 169 | else: 170 | raise ApiTypeError( 171 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 172 | % ( 173 | args, 174 | self.__class__.__name__, 175 | ), 176 | path_to_item=_path_to_item, 177 | valid_classes=(self.__class__,), 178 | ) 179 | 180 | self._data_store = {} 181 | self._check_type = _check_type 182 | self._spec_property_naming = _spec_property_naming 183 | self._path_to_item = _path_to_item 184 | self._configuration = _configuration 185 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 186 | self.value = value 187 | if kwargs: 188 | raise ApiTypeError( 189 | "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." 190 | % ( 191 | kwargs, 192 | self.__class__.__name__, 193 | ), 194 | path_to_item=_path_to_item, 195 | valid_classes=(self.__class__,), 196 | ) 197 | 198 | @classmethod 199 | @convert_js_args_to_python_args 200 | def _from_openapi_data(cls, *args, **kwargs): 201 | """StationOverviewResult - a model defined in OpenAPI 202 | 203 | Note that value can be passed either in args or in kwargs, but not in both. 204 | 205 | Args: 206 | args[0] ([Station]): # noqa: E501 207 | 208 | Keyword Args: 209 | value ([Station]): # noqa: E501 210 | _check_type (bool): if True, values for parameters in openapi_types 211 | will be type checked and a TypeError will be 212 | raised if the wrong type is input. 213 | Defaults to True 214 | _path_to_item (tuple/list): This is a list of keys or values to 215 | drill down to the model in received_data 216 | when deserializing a response 217 | _spec_property_naming (bool): True if the variable names in the input data 218 | are serialized names, as specified in the OpenAPI document. 219 | False if the variable names in the input data 220 | are pythonic names, e.g. snake case (default) 221 | _configuration (Configuration): the instance to use when 222 | deserializing a file_type parameter. 223 | If passed, type conversion is attempted 224 | If omitted no type conversion is done. 225 | _visited_composed_classes (tuple): This stores a tuple of 226 | classes that we have traveled through so that 227 | if we see that class again we will not use its 228 | discriminator again. 229 | When traveling through a discriminator, the 230 | composed schema that is 231 | is traveled through is added to this set. 232 | For example if Animal has a discriminator 233 | petType and we pass in "Dog", and the class Dog 234 | allOf includes Animal, we move through Animal 235 | once using the discriminator, and pick Dog. 236 | Then in Dog, we will make an instance of the 237 | Animal class but this time we won't travel 238 | through its discriminator because we passed in 239 | _visited_composed_classes = (Animal,) 240 | """ 241 | # required up here when default value is not given 242 | _path_to_item = kwargs.pop("_path_to_item", ()) 243 | 244 | self = super(OpenApiModel, cls).__new__(cls) 245 | 246 | if "value" in kwargs: 247 | value = kwargs.pop("value") 248 | elif args: 249 | args = list(args) 250 | value = args.pop(0) 251 | else: 252 | raise ApiTypeError( 253 | "value is required, but not passed in args or kwargs and doesn't have default", 254 | path_to_item=_path_to_item, 255 | valid_classes=(self.__class__,), 256 | ) 257 | 258 | _check_type = kwargs.pop("_check_type", True) 259 | _spec_property_naming = kwargs.pop("_spec_property_naming", False) 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 | self.value = value 285 | if kwargs: 286 | raise ApiTypeError( 287 | "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." 288 | % ( 289 | kwargs, 290 | self.__class__.__name__, 291 | ), 292 | path_to_item=_path_to_item, 293 | valid_classes=(self.__class__,), 294 | ) 295 | 296 | return self 297 | -------------------------------------------------------------------------------- /python-client/deutschland/pegel_online/model/station_water.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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 StationWater(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 | "shortname": (str,), # noqa: E501 93 | "longname": (str,), # noqa: E501 94 | } 95 | 96 | @cached_property 97 | def discriminator(): 98 | return None 99 | 100 | attribute_map = { 101 | "shortname": "shortname", # noqa: E501 102 | "longname": "longname", # 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 | """StationWater - 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 | shortname (str): [optional] # noqa: E501 146 | longname (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 | """StationWater - 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 | shortname (str): [optional] # noqa: E501 238 | longname (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/pegel_online/model/timeseries_not_found.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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 TimeseriesNotFound(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 | "status": (int,), # noqa: E501 93 | "msg": (str,), # noqa: E501 94 | } 95 | 96 | @cached_property 97 | def discriminator(): 98 | return None 99 | 100 | attribute_map = { 101 | "status": "status", # noqa: E501 102 | "msg": "msg", # 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 | """TimeseriesNotFound - 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 | status (int): [optional] # noqa: E501 146 | msg (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 | """TimeseriesNotFound - 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 | status (int): [optional] # noqa: E501 238 | msg (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/pegel_online/model/water_result.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.exceptions import ApiAttributeError 16 | from deutschland.pegel_online.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 WaterResult(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 | "shortname": (str,), # noqa: E501 93 | "longname": (str,), # noqa: E501 94 | } 95 | 96 | @cached_property 97 | def discriminator(): 98 | return None 99 | 100 | attribute_map = { 101 | "shortname": "shortname", # noqa: E501 102 | "longname": "longname", # 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 | """WaterResult - 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 | shortname (str): Kurzbezeichnung, maximal 40 Zeichen.. [optional] # noqa: E501 146 | longname (str): Langbezeichnung, maximal 255 Zeichen.. [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 | """WaterResult - 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 | shortname (str): Kurzbezeichnung, maximal 40 Zeichen.. [optional] # noqa: E501 238 | longname (str): Langbezeichnung, maximal 255 Zeichen.. [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/pegel_online/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.pegel_online.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.pegel_online.model.comment import Comment 13 | from deutschland.pegel_online.model.comment_inner import CommentInner 14 | from deutschland.pegel_online.model.current_measurement import CurrentMeasurement 15 | from deutschland.pegel_online.model.measurement_result import MeasurementResult 16 | from deutschland.pegel_online.model.measurement_result_inner import ( 17 | MeasurementResultInner, 18 | ) 19 | from deutschland.pegel_online.model.station import Station 20 | from deutschland.pegel_online.model.station_overview_result import StationOverviewResult 21 | from deutschland.pegel_online.model.station_water import StationWater 22 | from deutschland.pegel_online.model.timeseries import Timeseries 23 | from deutschland.pegel_online.model.timeseries_gauge_zero import TimeseriesGaugeZero 24 | from deutschland.pegel_online.model.timeseries_not_found import TimeseriesNotFound 25 | from deutschland.pegel_online.model.water_result import WaterResult 26 | -------------------------------------------------------------------------------- /python-client/docs/Comment.md: -------------------------------------------------------------------------------- 1 | # Comment 2 | 3 | Liegt z.B. eine Fehlfunktion oder ein Ausfall an der Messstelle vor, so ist dies hier mit einer Textbeschreibung erläutert. 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **value** | [**[CommentInner]**](CommentInner.md) | Liegt z.B. eine Fehlfunktion oder ein Ausfall an der Messstelle vor, so ist dies hier mit einer Textbeschreibung erläutert. | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /python-client/docs/CommentInner.md: -------------------------------------------------------------------------------- 1 | # CommentInner 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **short_description** | **str** | Kurzbeschreibung, maximal 55 Zeichen. | [optional] 8 | **long_description** | **str** | Langbeschreibung, maximal 500 Zeichen. | [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/docs/CurrentMeasurement.md: -------------------------------------------------------------------------------- 1 | # CurrentMeasurement 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **timestamp** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] 8 | **value** | **float** | | [optional] 9 | **trend** | **float** | | [optional] 10 | **state_mnw_mhw** | **str** | | [optional] 11 | **state_nsw_hsw** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] 12 | **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] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /python-client/docs/MeasurementApi.md: -------------------------------------------------------------------------------- 1 | # pegel_online.MeasurementApi 2 | 3 | All URIs are relative to *https://www.pegelonline.wsv.de/webservices/rest-api/v2* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_measurement_by_station**](MeasurementApi.md#get_measurement_by_station) | **GET** /stations/{station}/{timeseries}/measurements.json | Zugriff auf die Ressource Measurement 8 | [**get_measurement_diagram_by_station**](MeasurementApi.md#get_measurement_diagram_by_station) | **GET** /stations/{station}/{timeseries}/measurements.png | Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG) 9 | 10 | 11 | # **get_measurement_by_station** 12 | > MeasurementResult get_measurement_by_station(station, timeseries) 13 | 14 | Zugriff auf die Ressource Measurement 15 | 16 | Es handeln sich dabei um die gemessenen Rohwerte. Es können maximal Werte der letzten 31 Tage bezogen werden. 17 | 18 | ### Example 19 | 20 | 21 | ```python 22 | import time 23 | from deutschland import pegel_online 24 | from deutschland.pegel_online.api import measurement_api 25 | from deutschland.pegel_online.model.timeseries_not_found import TimeseriesNotFound 26 | from deutschland.pegel_online.model.measurement_result import MeasurementResult 27 | from pprint import pprint 28 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 29 | # See configuration.py for a list of all supported configuration parameters. 30 | configuration = pegel_online.Configuration( 31 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 32 | ) 33 | 34 | 35 | # Enter a context with an instance of the API client 36 | with pegel_online.ApiClient() as api_client: 37 | # Create an instance of the API class 38 | api_instance = measurement_api.MeasurementApi(api_client) 39 | station = "593647aa-9fea-43ec-a7d6-6476a76ae868" # str | UUID / Name / Pegelnummer der Station. 40 | timeseries = "W" # str | timeseries shortname 41 | start = "2022-02-06T09:00:00+01:00" # str | Zeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Angabe eines Datums oder einer Period (_P_, z.B. 'P8D' für die Messwerte der letzten 8 Tage) sind möglich. (optional) 42 | end = "" # str | Endzeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Kann auch leer gelassen werden, dann wird automatisch der aktuelle Zeitstempel verwendet. (optional) 43 | 44 | # example passing only required values which don't have defaults set 45 | try: 46 | # Zugriff auf die Ressource Measurement 47 | api_response = api_instance.get_measurement_by_station(station, timeseries) 48 | pprint(api_response) 49 | except pegel_online.ApiException as e: 50 | print("Exception when calling MeasurementApi->get_measurement_by_station: %s\n" % e) 51 | 52 | # example passing only required values which don't have defaults set 53 | # and optional values 54 | try: 55 | # Zugriff auf die Ressource Measurement 56 | api_response = api_instance.get_measurement_by_station(station, timeseries, start=start, end=end) 57 | pprint(api_response) 58 | except pegel_online.ApiException as e: 59 | print("Exception when calling MeasurementApi->get_measurement_by_station: %s\n" % e) 60 | ``` 61 | 62 | 63 | ### Parameters 64 | 65 | Name | Type | Description | Notes 66 | ------------- | ------------- | ------------- | ------------- 67 | **station** | **str**| UUID / Name / Pegelnummer der Station. | 68 | **timeseries** | **str**| timeseries shortname | 69 | **start** | **str**| Zeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Angabe eines Datums oder einer Period (_P_, z.B. 'P8D' für die Messwerte der letzten 8 Tage) sind möglich. | [optional] 70 | **end** | **str**| Endzeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Kann auch leer gelassen werden, dann wird automatisch der aktuelle Zeitstempel verwendet. | [optional] 71 | 72 | ### Return type 73 | 74 | [**MeasurementResult**](MeasurementResult.md) 75 | 76 | ### Authorization 77 | 78 | No authorization required 79 | 80 | ### HTTP request headers 81 | 82 | - **Content-Type**: Not defined 83 | - **Accept**: application/json 84 | 85 | 86 | ### HTTP response details 87 | 88 | | Status code | Description | Response headers | 89 | |-------------|-------------|------------------| 90 | **200** | OK | - | 91 | **404** | OK | - | 92 | 93 | [[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) 94 | 95 | # **get_measurement_diagram_by_station** 96 | > file_type get_measurement_diagram_by_station(station, timeseries) 97 | 98 | Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG) 99 | 100 | Es handelt sich dabei um die gemessenen Rohwerte. Es können maximal Werte der letzten 31 Tage bezogen werden. 101 | 102 | ### Example 103 | 104 | 105 | ```python 106 | import time 107 | from deutschland import pegel_online 108 | from deutschland.pegel_online.api import measurement_api 109 | from deutschland.pegel_online.model.timeseries_not_found import TimeseriesNotFound 110 | from pprint import pprint 111 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 112 | # See configuration.py for a list of all supported configuration parameters. 113 | configuration = pegel_online.Configuration( 114 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 115 | ) 116 | 117 | 118 | # Enter a context with an instance of the API client 119 | with pegel_online.ApiClient() as api_client: 120 | # Create an instance of the API class 121 | api_instance = measurement_api.MeasurementApi(api_client) 122 | station = "593647aa-9fea-43ec-a7d6-6476a76ae868" # str | UUID / Name / Pegelnummer der Station. 123 | timeseries = "W" # str | timeseries shortname 124 | start = "2022-02-06T09:00:00+01:00" # str | Zeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Angabe eines Datums oder einer Period (_P_, z.B. 'P8D' für die Messwerte der letzten 8 Tage) sind möglich. (optional) 125 | end = "" # str | Endzeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Kann auch leer gelassen werden, dann wird automatisch der aktuelle Zeitstempel verwendet. (optional) 126 | width = 900 # float | Breite der grafischen Darstellung (optional) 127 | height = 400 # float | Höhe der grafischen Darstellung (optional) 128 | enable_secondary_y_axis = True # bool | Aktivierung einer zweiten Y-Achse auf der rechten Seite (optional) 129 | 130 | # example passing only required values which don't have defaults set 131 | try: 132 | # Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG) 133 | api_response = api_instance.get_measurement_diagram_by_station(station, timeseries) 134 | pprint(api_response) 135 | except pegel_online.ApiException as e: 136 | print("Exception when calling MeasurementApi->get_measurement_diagram_by_station: %s\n" % e) 137 | 138 | # example passing only required values which don't have defaults set 139 | # and optional values 140 | try: 141 | # Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG) 142 | api_response = api_instance.get_measurement_diagram_by_station(station, timeseries, start=start, end=end, width=width, height=height, enable_secondary_y_axis=enable_secondary_y_axis) 143 | pprint(api_response) 144 | except pegel_online.ApiException as e: 145 | print("Exception when calling MeasurementApi->get_measurement_diagram_by_station: %s\n" % e) 146 | ``` 147 | 148 | 149 | ### Parameters 150 | 151 | Name | Type | Description | Notes 152 | ------------- | ------------- | ------------- | ------------- 153 | **station** | **str**| UUID / Name / Pegelnummer der Station. | 154 | **timeseries** | **str**| timeseries shortname | 155 | **start** | **str**| Zeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Angabe eines Datums oder einer Period (_P_, z.B. 'P8D' für die Messwerte der letzten 8 Tage) sind möglich. | [optional] 156 | **end** | **str**| Endzeitpunkt codiert im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format. Kann auch leer gelassen werden, dann wird automatisch der aktuelle Zeitstempel verwendet. | [optional] 157 | **width** | **float**| Breite der grafischen Darstellung | [optional] 158 | **height** | **float**| Höhe der grafischen Darstellung | [optional] 159 | **enable_secondary_y_axis** | **bool**| Aktivierung einer zweiten Y-Achse auf der rechten Seite | [optional] 160 | 161 | ### Return type 162 | 163 | **file_type** 164 | 165 | ### Authorization 166 | 167 | No authorization required 168 | 169 | ### HTTP request headers 170 | 171 | - **Content-Type**: Not defined 172 | - **Accept**: image/png, application/json 173 | 174 | 175 | ### HTTP response details 176 | 177 | | Status code | Description | Response headers | 178 | |-------------|-------------|------------------| 179 | **200** | OK | - | 180 | **404** | OK | - | 181 | 182 | [[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) 183 | 184 | -------------------------------------------------------------------------------- /python-client/docs/MeasurementResult.md: -------------------------------------------------------------------------------- 1 | # MeasurementResult 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **value** | [**[MeasurementResultInner]**](MeasurementResultInner.md) | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /python-client/docs/MeasurementResultInner.md: -------------------------------------------------------------------------------- 1 | # MeasurementResultInner 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **timestamp** | **str** | Zeitpunkt im [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Format codiert | [optional] 8 | **value** | **float** | Wert als Dezimalzahl in der Einheit, welche durch die Timeseries der Station vorgegeben ist. | [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/docs/Station.md: -------------------------------------------------------------------------------- 1 | # Station 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **uuid** | **str** | Eindeutige unveränderliche ID | [optional] 8 | **number** | **str** | Pegelnummer | [optional] 9 | **shortname** | **str** | Pegelname (max. 40 Zeichen) | [optional] 10 | **longname** | **str** | Pegelname (max. 255 Zeichen) | [optional] 11 | **km** | **float** | Flusskilometer | [optional] 12 | **agency** | **str** | Wasserstraßen- und Schifffahrtsamt | [optional] 13 | **longitude** | **float** | Längengrad in WGS84 Dezimalnotation | [optional] 14 | **latitude** | **float** | Breitengrad in WGS84 Dezimalnotation | [optional] 15 | **water** | [**StationWater**](StationWater.md) | | [optional] 16 | **timeseries** | [**[Timeseries]**](Timeseries.md) | | [optional] 17 | **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] 18 | 19 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 20 | 21 | 22 | -------------------------------------------------------------------------------- /python-client/docs/StationApi.md: -------------------------------------------------------------------------------- 1 | # pegel_online.StationApi 2 | 3 | All URIs are relative to *https://www.pegelonline.wsv.de/webservices/rest-api/v2* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_stations**](StationApi.md#get_stations) | **GET** /stations.json | Übersicht über alle Stationen (Pegel) 8 | [**get_stations_by_id**](StationApi.md#get_stations_by_id) | **GET** /stations/{station}.json | Zugriff auf eine bestimmte Station (Pegel) 9 | 10 | 11 | # **get_stations** 12 | > StationOverviewResult get_stations() 13 | 14 | Übersicht über alle Stationen (Pegel) 15 | 16 | Stationen (Pegel) sortiert nach Gewässername und Messstellenname. 17 | 18 | ### Example 19 | 20 | 21 | ```python 22 | import time 23 | from deutschland import pegel_online 24 | from deutschland.pegel_online.api import station_api 25 | from deutschland.pegel_online.model.station_overview_result import StationOverviewResult 26 | from pprint import pprint 27 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 28 | # See configuration.py for a list of all supported configuration parameters. 29 | configuration = pegel_online.Configuration( 30 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 31 | ) 32 | 33 | 34 | # Enter a context with an instance of the API client 35 | with pegel_online.ApiClient() as api_client: 36 | # Create an instance of the API class 37 | api_instance = station_api.StationApi(api_client) 38 | include_timeseries = True # bool | Informationen zu den Zeitreihen (optional) 39 | include_current_measurement = True # bool | Aktuell gemessener Wert (optional) 40 | include_characteristic_values = True # bool | kennzeichnende Wasserstände (optional) 41 | waters = [] # [str] | Gewässer, filtert Stationen für bestimmte Gewässer (optional) 42 | ids = [ 43 | "ids_example", 44 | ] # [str] | Filter nach Stationen, möglich sind der Pegelname, Pegelnummer oder die UUID (optional) 45 | timeseries = "" # str | Filter nach ausgewählten Zeitreihen (optional) 46 | fuzzy_id = "" # str | (optional) 47 | latitude = 3.14 # float | Breitengrad einer geografischen Position (WGS84 in Dezimalnotation) (optional) 48 | longitude = 3.14 # float | Längengrad einer geografischen Position (WGS84 in Dezimalnotation) (optional) 49 | km = 3.14 # float | Flusskilometer, die Angabe eines Gewässers (waters) ist notwendig (optional) 50 | radius = 3.14 # float | Suchradius für Stationen um die geografische Position oder den angegebenen Flusskilometer. Longitude und / oder Latitude oder km sind notwendig. (optional) 51 | 52 | # example passing only required values which don't have defaults set 53 | # and optional values 54 | try: 55 | # Übersicht über alle Stationen (Pegel) 56 | api_response = api_instance.get_stations(include_timeseries=include_timeseries, include_current_measurement=include_current_measurement, include_characteristic_values=include_characteristic_values, waters=waters, ids=ids, timeseries=timeseries, fuzzy_id=fuzzy_id, latitude=latitude, longitude=longitude, km=km, radius=radius) 57 | pprint(api_response) 58 | except pegel_online.ApiException as e: 59 | print("Exception when calling StationApi->get_stations: %s\n" % e) 60 | ``` 61 | 62 | 63 | ### Parameters 64 | 65 | Name | Type | Description | Notes 66 | ------------- | ------------- | ------------- | ------------- 67 | **include_timeseries** | **bool**| Informationen zu den Zeitreihen | [optional] 68 | **include_current_measurement** | **bool**| Aktuell gemessener Wert | [optional] 69 | **include_characteristic_values** | **bool**| kennzeichnende Wasserstände | [optional] 70 | **waters** | **[str]**| Gewässer, filtert Stationen für bestimmte Gewässer | [optional] 71 | **ids** | **[str]**| Filter nach Stationen, möglich sind der Pegelname, Pegelnummer oder die UUID | [optional] 72 | **timeseries** | **str**| Filter nach ausgewählten Zeitreihen | [optional] 73 | **fuzzy_id** | **str**| | [optional] 74 | **latitude** | **float**| Breitengrad einer geografischen Position (WGS84 in Dezimalnotation) | [optional] 75 | **longitude** | **float**| Längengrad einer geografischen Position (WGS84 in Dezimalnotation) | [optional] 76 | **km** | **float**| Flusskilometer, die Angabe eines Gewässers (waters) ist notwendig | [optional] 77 | **radius** | **float**| Suchradius für Stationen um die geografische Position oder den angegebenen Flusskilometer. Longitude und / oder Latitude oder km sind notwendig. | [optional] 78 | 79 | ### Return type 80 | 81 | [**StationOverviewResult**](StationOverviewResult.md) 82 | 83 | ### Authorization 84 | 85 | No authorization required 86 | 87 | ### HTTP request headers 88 | 89 | - **Content-Type**: Not defined 90 | - **Accept**: application/json 91 | 92 | 93 | ### HTTP response details 94 | 95 | | Status code | Description | Response headers | 96 | |-------------|-------------|------------------| 97 | **200** | OK | - | 98 | 99 | [[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) 100 | 101 | # **get_stations_by_id** 102 | > Station get_stations_by_id(station) 103 | 104 | Zugriff auf eine bestimmte Station (Pegel) 105 | 106 | Zugriff auf eine Station (Pegel) ist mittels des Namens, der Pegelnummer sowie der UUID möglich. Es wird die Verwendung der UUID empfohlen. 107 | 108 | ### Example 109 | 110 | 111 | ```python 112 | import time 113 | from deutschland import pegel_online 114 | from deutschland.pegel_online.api import station_api 115 | from deutschland.pegel_online.model.station import Station 116 | from pprint import pprint 117 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 118 | # See configuration.py for a list of all supported configuration parameters. 119 | configuration = pegel_online.Configuration( 120 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 121 | ) 122 | 123 | 124 | # Enter a context with an instance of the API client 125 | with pegel_online.ApiClient() as api_client: 126 | # Create an instance of the API class 127 | api_instance = station_api.StationApi(api_client) 128 | station = "593647aa-9fea-43ec-a7d6-6476a76ae868" # str | UUID / Name / Pegelnummer der Station. 129 | include_timeseries = True # bool | Informationen zu den Zeitreihen (optional) 130 | include_current_measurement = True # bool | Aktuell gemessener Wert (optional) 131 | include_characteristic_values = True # bool | kennzeichnende Wasserstände (optional) 132 | 133 | # example passing only required values which don't have defaults set 134 | try: 135 | # Zugriff auf eine bestimmte Station (Pegel) 136 | api_response = api_instance.get_stations_by_id(station) 137 | pprint(api_response) 138 | except pegel_online.ApiException as e: 139 | print("Exception when calling StationApi->get_stations_by_id: %s\n" % e) 140 | 141 | # example passing only required values which don't have defaults set 142 | # and optional values 143 | try: 144 | # Zugriff auf eine bestimmte Station (Pegel) 145 | api_response = api_instance.get_stations_by_id(station, include_timeseries=include_timeseries, include_current_measurement=include_current_measurement, include_characteristic_values=include_characteristic_values) 146 | pprint(api_response) 147 | except pegel_online.ApiException as e: 148 | print("Exception when calling StationApi->get_stations_by_id: %s\n" % e) 149 | ``` 150 | 151 | 152 | ### Parameters 153 | 154 | Name | Type | Description | Notes 155 | ------------- | ------------- | ------------- | ------------- 156 | **station** | **str**| UUID / Name / Pegelnummer der Station. | 157 | **include_timeseries** | **bool**| Informationen zu den Zeitreihen | [optional] 158 | **include_current_measurement** | **bool**| Aktuell gemessener Wert | [optional] 159 | **include_characteristic_values** | **bool**| kennzeichnende Wasserstände | [optional] 160 | 161 | ### Return type 162 | 163 | [**Station**](Station.md) 164 | 165 | ### Authorization 166 | 167 | No authorization required 168 | 169 | ### HTTP request headers 170 | 171 | - **Content-Type**: Not defined 172 | - **Accept**: application/json 173 | 174 | 175 | ### HTTP response details 176 | 177 | | Status code | Description | Response headers | 178 | |-------------|-------------|------------------| 179 | **200** | OK | - | 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/StationOverviewResult.md: -------------------------------------------------------------------------------- 1 | # StationOverviewResult 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **value** | [**[Station]**](Station.md) | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /python-client/docs/StationWater.md: -------------------------------------------------------------------------------- 1 | # StationWater 2 | 3 | Angaben zum Gewässer 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **shortname** | **str** | | [optional] 9 | **longname** | **str** | | [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/Timeseries.md: -------------------------------------------------------------------------------- 1 | # Timeseries 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **shortname** | **str** | Kurzbezeichnung | [optional] 8 | **longname** | **str** | Langbezeichnung | [optional] 9 | **unit** | **str** | Maßeinheit | [optional] 10 | **equidistance** | **float** | Abstand der Messwerte in Minuten. | [optional] 11 | **current_measurement** | [**CurrentMeasurement**](CurrentMeasurement.md) | | [optional] 12 | **gauge_zero** | [**TimeseriesGaugeZero**](TimeseriesGaugeZero.md) | | [optional] 13 | **characteristic_values** | **[dict]** | | [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/TimeseriesGaugeZero.md: -------------------------------------------------------------------------------- 1 | # TimeseriesGaugeZero 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **unit** | **str** | Einheit des Pegelnullpunkts (immer in Metern über einem Normalhöhennull ([Dokumentation](https://www.pegelonline.wsv.de/gast/hilfe#hilfe_hoehensystem)) | [optional] 8 | **value** | **float** | Höhe als Dezimalwert | [optional] 9 | **valid_from** | **date** | Beginn der Gültigkeit. [ISO_8601](https://de.wikipedia.org/wiki/ISO_8601) Datum. | [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/TimeseriesNotFound.md: -------------------------------------------------------------------------------- 1 | # TimeseriesNotFound 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **status** | **int** | | [optional] 8 | **msg** | **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/docs/WaterApi.md: -------------------------------------------------------------------------------- 1 | # pegel_online.WaterApi 2 | 3 | All URIs are relative to *https://www.pegelonline.wsv.de/webservices/rest-api/v2* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_current_measurment_by_station**](WaterApi.md#get_current_measurment_by_station) | **GET** /stations/{station}/{timeseries}.json | Zugriff auf eine Timeseries 8 | [**get_waters**](WaterApi.md#get_waters) | **GET** /waters.json | Zugriff auf die Ressource Water 9 | 10 | 11 | # **get_current_measurment_by_station** 12 | > Timeseries get_current_measurment_by_station(station, timeseries) 13 | 14 | Zugriff auf eine Timeseries 15 | 16 | Liefert den aktuellen Wert der Station (Pegel). Kann auch als Unterressource von Timeseries angefordert werden. 17 | 18 | ### Example 19 | 20 | 21 | ```python 22 | import time 23 | from deutschland import pegel_online 24 | from deutschland.pegel_online.api import water_api 25 | from deutschland.pegel_online.model.timeseries_not_found import TimeseriesNotFound 26 | from deutschland.pegel_online.model.timeseries import Timeseries 27 | from pprint import pprint 28 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 29 | # See configuration.py for a list of all supported configuration parameters. 30 | configuration = pegel_online.Configuration( 31 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 32 | ) 33 | 34 | 35 | # Enter a context with an instance of the API client 36 | with pegel_online.ApiClient() as api_client: 37 | # Create an instance of the API class 38 | api_instance = water_api.WaterApi(api_client) 39 | station = "593647aa-9fea-43ec-a7d6-6476a76ae868" # str | UUID / Name / Pegelnummer der Station. 40 | timeseries = "W" # str | timeseries shortname 41 | include_current_measurement = True # bool | Aktuell gemessener Wert (optional) 42 | include_characteristic_values = True # bool | kennzeichnende Wasserstände (optional) 43 | 44 | # example passing only required values which don't have defaults set 45 | try: 46 | # Zugriff auf eine Timeseries 47 | api_response = api_instance.get_current_measurment_by_station(station, timeseries) 48 | pprint(api_response) 49 | except pegel_online.ApiException as e: 50 | print("Exception when calling WaterApi->get_current_measurment_by_station: %s\n" % e) 51 | 52 | # example passing only required values which don't have defaults set 53 | # and optional values 54 | try: 55 | # Zugriff auf eine Timeseries 56 | api_response = api_instance.get_current_measurment_by_station(station, timeseries, include_current_measurement=include_current_measurement, include_characteristic_values=include_characteristic_values) 57 | pprint(api_response) 58 | except pegel_online.ApiException as e: 59 | print("Exception when calling WaterApi->get_current_measurment_by_station: %s\n" % e) 60 | ``` 61 | 62 | 63 | ### Parameters 64 | 65 | Name | Type | Description | Notes 66 | ------------- | ------------- | ------------- | ------------- 67 | **station** | **str**| UUID / Name / Pegelnummer der Station. | 68 | **timeseries** | **str**| timeseries shortname | 69 | **include_current_measurement** | **bool**| Aktuell gemessener Wert | [optional] 70 | **include_characteristic_values** | **bool**| kennzeichnende Wasserstände | [optional] 71 | 72 | ### Return type 73 | 74 | [**Timeseries**](Timeseries.md) 75 | 76 | ### Authorization 77 | 78 | No authorization required 79 | 80 | ### HTTP request headers 81 | 82 | - **Content-Type**: Not defined 83 | - **Accept**: application/json 84 | 85 | 86 | ### HTTP response details 87 | 88 | | Status code | Description | Response headers | 89 | |-------------|-------------|------------------| 90 | **200** | OK | - | 91 | **404** | OK | - | 92 | 93 | [[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) 94 | 95 | # **get_waters** 96 | > WaterResult get_waters() 97 | 98 | Zugriff auf die Ressource Water 99 | 100 | Alle Gewässer 101 | 102 | ### Example 103 | 104 | 105 | ```python 106 | import time 107 | from deutschland import pegel_online 108 | from deutschland.pegel_online.api import water_api 109 | from deutschland.pegel_online.model.water_result import WaterResult 110 | from pprint import pprint 111 | # Defining the host is optional and defaults to https://www.pegelonline.wsv.de/webservices/rest-api/v2 112 | # See configuration.py for a list of all supported configuration parameters. 113 | configuration = pegel_online.Configuration( 114 | host = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" 115 | ) 116 | 117 | 118 | # Enter a context with an instance of the API client 119 | with pegel_online.ApiClient() as api_client: 120 | # Create an instance of the API class 121 | api_instance = water_api.WaterApi(api_client) 122 | ids = [ 123 | "ids_example", 124 | ] # [str] | Beschränkung auf ausgewählte Gewässer IDs (optional) 125 | stations = "stations_example" # str | Beschränkung auf ausgewählte Stationen (Pegel) (optional) 126 | include_stations = True # bool | Stationen mit zurückgeben (optional) 127 | include_timeseries = True # bool | Informationen zu den Zeitreihen (optional) 128 | include_current_measurement = True # bool | Aktuell gemessener Wert (optional) 129 | include_characteristic_values = True # bool | kennzeichnende Wasserstände (optional) 130 | 131 | # example passing only required values which don't have defaults set 132 | # and optional values 133 | try: 134 | # Zugriff auf die Ressource Water 135 | api_response = api_instance.get_waters(ids=ids, stations=stations, include_stations=include_stations, include_timeseries=include_timeseries, include_current_measurement=include_current_measurement, include_characteristic_values=include_characteristic_values) 136 | pprint(api_response) 137 | except pegel_online.ApiException as e: 138 | print("Exception when calling WaterApi->get_waters: %s\n" % e) 139 | ``` 140 | 141 | 142 | ### Parameters 143 | 144 | Name | Type | Description | Notes 145 | ------------- | ------------- | ------------- | ------------- 146 | **ids** | **[str]**| Beschränkung auf ausgewählte Gewässer IDs | [optional] 147 | **stations** | **str**| Beschränkung auf ausgewählte Stationen (Pegel) | [optional] 148 | **include_stations** | **bool**| Stationen mit zurückgeben | [optional] 149 | **include_timeseries** | **bool**| Informationen zu den Zeitreihen | [optional] 150 | **include_current_measurement** | **bool**| Aktuell gemessener Wert | [optional] 151 | **include_characteristic_values** | **bool**| kennzeichnende Wasserstände | [optional] 152 | 153 | ### Return type 154 | 155 | [**WaterResult**](WaterResult.md) 156 | 157 | ### Authorization 158 | 159 | No authorization required 160 | 161 | ### HTTP request headers 162 | 163 | - **Content-Type**: Not defined 164 | - **Accept**: application/json 165 | 166 | 167 | ### HTTP response details 168 | 169 | | Status code | Description | Response headers | 170 | |-------------|-------------|------------------| 171 | **200** | OK | - | 172 | 173 | [[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) 174 | 175 | -------------------------------------------------------------------------------- /python-client/docs/WaterResult.md: -------------------------------------------------------------------------------- 1 | # WaterResult 2 | 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **shortname** | **str** | Kurzbezeichnung, maximal 40 Zeichen. | [optional] 8 | **longname** | **str** | Langbezeichnung, maximal 255 Zeichen. | [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-pegel-online" 4 | version = "0.1.1" 5 | description = "Pegel-Online API" 6 | keywords = ["OpenAPI", "OpenAPI-Generator", "pegel-online", "App", "API"] 7 | homepage = "https://github.com/bundesAPI/pegel-online-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/pegel-online-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 = "pegel_online-api" 14 | copyright = "2023, Wasserstraßen- und Schifffahrtsverwaltung des Bundes (WSV)" 15 | author = "Wasserstraßen- und Schifffahrtsverwaltung des Bundes (WSV)" 16 | 17 | version = "0.1.1" 18 | release = "0.1.1" 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 | pegel_online-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 | pegel_online 8 | -------------------------------------------------------------------------------- /python-client/sphinx-docs/source/pegel_online.api.rst: -------------------------------------------------------------------------------- 1 | pegel\_online.api package 2 | ========================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pegel\_online.api.measurement\_api module 8 | ----------------------------------------- 9 | 10 | .. automodule:: pegel_online.api.measurement_api 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pegel\_online.api.station\_api module 16 | ------------------------------------- 17 | 18 | .. automodule:: pegel_online.api.station_api 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pegel\_online.api.water\_api module 24 | ----------------------------------- 25 | 26 | .. automodule:: pegel_online.api.water_api 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pegel_online.api 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /python-client/sphinx-docs/source/pegel_online.apis.rst: -------------------------------------------------------------------------------- 1 | pegel\_online.apis package 2 | ========================== 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: pegel_online.apis 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /python-client/sphinx-docs/source/pegel_online.model.rst: -------------------------------------------------------------------------------- 1 | pegel\_online.model package 2 | =========================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pegel\_online.model.comment module 8 | ---------------------------------- 9 | 10 | .. automodule:: pegel_online.model.comment 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pegel\_online.model.comment\_inner module 16 | ----------------------------------------- 17 | 18 | .. automodule:: pegel_online.model.comment_inner 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pegel\_online.model.current\_measurement module 24 | ----------------------------------------------- 25 | 26 | .. automodule:: pegel_online.model.current_measurement 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pegel\_online.model.measurement\_result module 32 | ---------------------------------------------- 33 | 34 | .. automodule:: pegel_online.model.measurement_result 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pegel\_online.model.measurement\_result\_inner module 40 | ----------------------------------------------------- 41 | 42 | .. automodule:: pegel_online.model.measurement_result_inner 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | pegel\_online.model.station module 48 | ---------------------------------- 49 | 50 | .. automodule:: pegel_online.model.station 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | 55 | pegel\_online.model.station\_overview\_result module 56 | ---------------------------------------------------- 57 | 58 | .. automodule:: pegel_online.model.station_overview_result 59 | :members: 60 | :undoc-members: 61 | :show-inheritance: 62 | 63 | pegel\_online.model.station\_water module 64 | ----------------------------------------- 65 | 66 | .. automodule:: pegel_online.model.station_water 67 | :members: 68 | :undoc-members: 69 | :show-inheritance: 70 | 71 | pegel\_online.model.timeseries module 72 | ------------------------------------- 73 | 74 | .. automodule:: pegel_online.model.timeseries 75 | :members: 76 | :undoc-members: 77 | :show-inheritance: 78 | 79 | pegel\_online.model.timeseries\_gauge\_zero module 80 | -------------------------------------------------- 81 | 82 | .. automodule:: pegel_online.model.timeseries_gauge_zero 83 | :members: 84 | :undoc-members: 85 | :show-inheritance: 86 | 87 | pegel\_online.model.timeseries\_not\_found module 88 | ------------------------------------------------- 89 | 90 | .. automodule:: pegel_online.model.timeseries_not_found 91 | :members: 92 | :undoc-members: 93 | :show-inheritance: 94 | 95 | pegel\_online.model.water\_result module 96 | ---------------------------------------- 97 | 98 | .. automodule:: pegel_online.model.water_result 99 | :members: 100 | :undoc-members: 101 | :show-inheritance: 102 | 103 | Module contents 104 | --------------- 105 | 106 | .. automodule:: pegel_online.model 107 | :members: 108 | :undoc-members: 109 | :show-inheritance: 110 | -------------------------------------------------------------------------------- /python-client/sphinx-docs/source/pegel_online.models.rst: -------------------------------------------------------------------------------- 1 | pegel\_online.models package 2 | ============================ 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: pegel_online.models 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /python-client/sphinx-docs/source/pegel_online.rst: -------------------------------------------------------------------------------- 1 | pegel\_online package 2 | ===================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pegel_online.api 11 | pegel_online.apis 12 | pegel_online.model 13 | pegel_online.models 14 | 15 | Submodules 16 | ---------- 17 | 18 | pegel\_online.api\_client module 19 | -------------------------------- 20 | 21 | .. automodule:: pegel_online.api_client 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | pegel\_online.configuration module 27 | ---------------------------------- 28 | 29 | .. automodule:: pegel_online.configuration 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | pegel\_online.exceptions module 35 | ------------------------------- 36 | 37 | .. automodule:: pegel_online.exceptions 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | pegel\_online.model\_utils module 43 | --------------------------------- 44 | 45 | .. automodule:: pegel_online.model_utils 46 | :members: 47 | :undoc-members: 48 | :show-inheritance: 49 | 50 | pegel\_online.rest module 51 | ------------------------- 52 | 53 | .. automodule:: pegel_online.rest 54 | :members: 55 | :undoc-members: 56 | :show-inheritance: 57 | 58 | Module contents 59 | --------------- 60 | 61 | .. automodule:: pegel_online 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/pegel-online-api/9c5885dc4ebee8cda3995ebe09a45c0a8a209672/python-client/test/__init__.py -------------------------------------------------------------------------------- /python-client/test/test_comment.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.comment_inner import CommentInner 16 | 17 | from deutschland import pegel_online 18 | 19 | globals()["CommentInner"] = CommentInner 20 | from deutschland.pegel_online.model.comment import Comment 21 | 22 | 23 | class TestComment(unittest.TestCase): 24 | """Comment unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testComment(self): 33 | """Test Comment""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = Comment() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == "__main__": 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /python-client/test/test_comment_inner.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.comment_inner import CommentInner 16 | 17 | from deutschland import pegel_online 18 | 19 | 20 | class TestCommentInner(unittest.TestCase): 21 | """CommentInner unit test stubs""" 22 | 23 | def setUp(self): 24 | pass 25 | 26 | def tearDown(self): 27 | pass 28 | 29 | def testCommentInner(self): 30 | """Test CommentInner""" 31 | # FIXME: construct object with mandatory attributes with example values 32 | # model = CommentInner() # noqa: E501 33 | pass 34 | 35 | 36 | if __name__ == "__main__": 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /python-client/test/test_current_measurement.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.current_measurement import CurrentMeasurement 16 | 17 | from deutschland import pegel_online 18 | 19 | 20 | class TestCurrentMeasurement(unittest.TestCase): 21 | """CurrentMeasurement unit test stubs""" 22 | 23 | def setUp(self): 24 | pass 25 | 26 | def tearDown(self): 27 | pass 28 | 29 | def testCurrentMeasurement(self): 30 | """Test CurrentMeasurement""" 31 | # FIXME: construct object with mandatory attributes with example values 32 | # model = CurrentMeasurement() # noqa: E501 33 | pass 34 | 35 | 36 | if __name__ == "__main__": 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /python-client/test/test_measurement_api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 7 | Contact: kontakt@bund.dev 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import unittest 13 | 14 | from deutschland.pegel_online.api.measurement_api import MeasurementApi # noqa: E501 15 | 16 | from deutschland import pegel_online 17 | 18 | 19 | class TestMeasurementApi(unittest.TestCase): 20 | """MeasurementApi unit test stubs""" 21 | 22 | def setUp(self): 23 | self.api = MeasurementApi() # noqa: E501 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def test_get_measurement_by_station(self): 29 | """Test case for get_measurement_by_station 30 | 31 | Zugriff auf die Ressource Measurement # noqa: E501 32 | """ 33 | pass 34 | 35 | def test_get_measurement_diagram_by_station(self): 36 | """Test case for get_measurement_diagram_by_station 37 | 38 | Zugriff auf die Ressource Measurement - Rückgabe als Diagramm (PNG) # noqa: E501 39 | """ 40 | pass 41 | 42 | 43 | if __name__ == "__main__": 44 | unittest.main() 45 | -------------------------------------------------------------------------------- /python-client/test/test_measurement_result.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.measurement_result_inner import ( 16 | MeasurementResultInner, 17 | ) 18 | 19 | from deutschland import pegel_online 20 | 21 | globals()["MeasurementResultInner"] = MeasurementResultInner 22 | from deutschland.pegel_online.model.measurement_result import MeasurementResult 23 | 24 | 25 | class TestMeasurementResult(unittest.TestCase): 26 | """MeasurementResult unit test stubs""" 27 | 28 | def setUp(self): 29 | pass 30 | 31 | def tearDown(self): 32 | pass 33 | 34 | def testMeasurementResult(self): 35 | """Test MeasurementResult""" 36 | # FIXME: construct object with mandatory attributes with example values 37 | # model = MeasurementResult() # noqa: E501 38 | pass 39 | 40 | 41 | if __name__ == "__main__": 42 | unittest.main() 43 | -------------------------------------------------------------------------------- /python-client/test/test_measurement_result_inner.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.measurement_result_inner import ( 16 | MeasurementResultInner, 17 | ) 18 | 19 | from deutschland import pegel_online 20 | 21 | 22 | class TestMeasurementResultInner(unittest.TestCase): 23 | """MeasurementResultInner unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testMeasurementResultInner(self): 32 | """Test MeasurementResultInner""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = MeasurementResultInner() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == "__main__": 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /python-client/test/test_station.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.station_water import StationWater 16 | from deutschland.pegel_online.model.timeseries import Timeseries 17 | 18 | from deutschland import pegel_online 19 | 20 | globals()["StationWater"] = StationWater 21 | globals()["Timeseries"] = Timeseries 22 | from deutschland.pegel_online.model.station import Station 23 | 24 | 25 | class TestStation(unittest.TestCase): 26 | """Station unit test stubs""" 27 | 28 | def setUp(self): 29 | pass 30 | 31 | def tearDown(self): 32 | pass 33 | 34 | def testStation(self): 35 | """Test Station""" 36 | # FIXME: construct object with mandatory attributes with example values 37 | # model = Station() # noqa: E501 38 | pass 39 | 40 | 41 | if __name__ == "__main__": 42 | unittest.main() 43 | -------------------------------------------------------------------------------- /python-client/test/test_station_api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 7 | Contact: kontakt@bund.dev 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import unittest 13 | 14 | from deutschland.pegel_online.api.station_api import StationApi # noqa: E501 15 | 16 | from deutschland import pegel_online 17 | 18 | 19 | class TestStationApi(unittest.TestCase): 20 | """StationApi unit test stubs""" 21 | 22 | def setUp(self): 23 | self.api = StationApi() # noqa: E501 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def test_get_stations(self): 29 | """Test case for get_stations 30 | 31 | Übersicht über alle Stationen (Pegel) # noqa: E501 32 | """ 33 | pass 34 | 35 | def test_get_stations_by_id(self): 36 | """Test case for get_stations_by_id 37 | 38 | Zugriff auf eine bestimmte Station (Pegel) # noqa: E501 39 | """ 40 | pass 41 | 42 | 43 | if __name__ == "__main__": 44 | unittest.main() 45 | -------------------------------------------------------------------------------- /python-client/test/test_station_overview_result.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.station import Station 16 | 17 | from deutschland import pegel_online 18 | 19 | globals()["Station"] = Station 20 | from deutschland.pegel_online.model.station_overview_result import StationOverviewResult 21 | 22 | 23 | class TestStationOverviewResult(unittest.TestCase): 24 | """StationOverviewResult unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testStationOverviewResult(self): 33 | """Test StationOverviewResult""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = StationOverviewResult() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == "__main__": 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /python-client/test/test_station_water.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.station_water import StationWater 16 | 17 | from deutschland import pegel_online 18 | 19 | 20 | class TestStationWater(unittest.TestCase): 21 | """StationWater unit test stubs""" 22 | 23 | def setUp(self): 24 | pass 25 | 26 | def tearDown(self): 27 | pass 28 | 29 | def testStationWater(self): 30 | """Test StationWater""" 31 | # FIXME: construct object with mandatory attributes with example values 32 | # model = StationWater() # noqa: E501 33 | pass 34 | 35 | 36 | if __name__ == "__main__": 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /python-client/test/test_timeseries.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.current_measurement import CurrentMeasurement 16 | from deutschland.pegel_online.model.timeseries_gauge_zero import TimeseriesGaugeZero 17 | 18 | from deutschland import pegel_online 19 | 20 | globals()["CurrentMeasurement"] = CurrentMeasurement 21 | globals()["TimeseriesGaugeZero"] = TimeseriesGaugeZero 22 | from deutschland.pegel_online.model.timeseries import Timeseries 23 | 24 | 25 | class TestTimeseries(unittest.TestCase): 26 | """Timeseries unit test stubs""" 27 | 28 | def setUp(self): 29 | pass 30 | 31 | def tearDown(self): 32 | pass 33 | 34 | def testTimeseries(self): 35 | """Test Timeseries""" 36 | # FIXME: construct object with mandatory attributes with example values 37 | # model = Timeseries() # noqa: E501 38 | pass 39 | 40 | 41 | if __name__ == "__main__": 42 | unittest.main() 43 | -------------------------------------------------------------------------------- /python-client/test/test_timeseries_gauge_zero.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.timeseries_gauge_zero import TimeseriesGaugeZero 16 | 17 | from deutschland import pegel_online 18 | 19 | 20 | class TestTimeseriesGaugeZero(unittest.TestCase): 21 | """TimeseriesGaugeZero unit test stubs""" 22 | 23 | def setUp(self): 24 | pass 25 | 26 | def tearDown(self): 27 | pass 28 | 29 | def testTimeseriesGaugeZero(self): 30 | """Test TimeseriesGaugeZero""" 31 | # FIXME: construct object with mandatory attributes with example values 32 | # model = TimeseriesGaugeZero() # noqa: E501 33 | pass 34 | 35 | 36 | if __name__ == "__main__": 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /python-client/test/test_timeseries_not_found.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.timeseries_not_found import TimeseriesNotFound 16 | 17 | from deutschland import pegel_online 18 | 19 | 20 | class TestTimeseriesNotFound(unittest.TestCase): 21 | """TimeseriesNotFound unit test stubs""" 22 | 23 | def setUp(self): 24 | pass 25 | 26 | def tearDown(self): 27 | pass 28 | 29 | def testTimeseriesNotFound(self): 30 | """Test TimeseriesNotFound""" 31 | # FIXME: construct object with mandatory attributes with example values 32 | # model = TimeseriesNotFound() # noqa: E501 33 | pass 34 | 35 | 36 | if __name__ == "__main__": 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /python-client/test/test_water_api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 7 | Contact: kontakt@bund.dev 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import unittest 13 | 14 | from deutschland.pegel_online.api.water_api import WaterApi # noqa: E501 15 | 16 | from deutschland import pegel_online 17 | 18 | 19 | class TestWaterApi(unittest.TestCase): 20 | """WaterApi unit test stubs""" 21 | 22 | def setUp(self): 23 | self.api = WaterApi() # noqa: E501 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def test_get_current_measurment_by_station(self): 29 | """Test case for get_current_measurment_by_station 30 | 31 | Zugriff auf eine Timeseries # noqa: E501 32 | """ 33 | pass 34 | 35 | def test_get_waters(self): 36 | """Test case for get_waters 37 | 38 | Zugriff auf die Ressource Water # noqa: E501 39 | """ 40 | pass 41 | 42 | 43 | if __name__ == "__main__": 44 | unittest.main() 45 | -------------------------------------------------------------------------------- /python-client/test/test_water_result.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pegel-Online API 3 | 4 | API für das bundesweite Messstellennetz der Wasserstraßen- und Schifffahrtsverwaltung des Bundes. Die API stellt drei verschiedene Ressourcen zur Verfügung: __Station__, __Measurement__, __Water__. ### Authentifizierung / Autorisierung / API Limitierung Es ist keine Authentifizierung oder Autorisierung notwendig. Aktuell besteht keine API Limitierung. ### Allgemeine Query-Parameter Zusätzlich zu den angegebenen Parametern sind ebenfalls allgemeine Parameter für alle Schnittstellen verfügbar ([Dokumentation](https://www.pegelonline.wsv.de/webservice/dokuRestapi;jsessionid=A294589CCEF6630142D2589F49BFA2EC#urlParameter)). - `charset`: Gibt die Kodierung der Response an. Standard ist hier _UTF-8_. Möglich ist z.B. auch _ISO-8859-1_. - `prettyprint`: Kann die zur besseren Lesbarkeit standardmäßig aktivierte Teilung der Response in mehreren Zeilen deaktivieren: _prettyprint=false_. Diese Einstellung wird für den produktiven Einsatz empfohlen. - `limit/offset`: Einschränkung der Anzahl der Ergebnisse. Hiermit kann 'Pagination' realisiert werden. `limit` gibt dabei die Anzahl der zurückgegebenen Elemente an. `offset` ermöglicht einen Offset vom Startwert. Beispiel: _limit=10&offset=20_ bedeutet, dass 10 Elemente beginnend mit dem 21. Element zurückgegeben werden. # noqa: E501 5 | 6 | The version of the OpenAPI document: 1.0.0 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.pegel_online.model.water_result import WaterResult 16 | 17 | from deutschland import pegel_online 18 | 19 | 20 | class TestWaterResult(unittest.TestCase): 21 | """WaterResult unit test stubs""" 22 | 23 | def setUp(self): 24 | pass 25 | 26 | def tearDown(self): 27 | pass 28 | 29 | def testWaterResult(self): 30 | """Test WaterResult""" 31 | # FIXME: construct object with mandatory attributes with example values 32 | # model = WaterResult() # 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=pegel_online 10 | --------------------------------------------------------------------------------