Skip to content

Latest commit

 

History

History
151 lines (113 loc) · 5.94 KB

README.md

File metadata and controls

151 lines (113 loc) · 5.94 KB

travelwarning

Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des Auswärtigen Amtes im Rahmen der OpenData Initiative.

Deaktivierung

Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben.

Fehlerfall

Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben.

Nutzungsbedingungen

Die Nutzungsbedingungen sind auf der OpenData-Schnittstelle des Auswärtigen Amtes zu finden.

Änderungen

version 1.0.1 (September 2021)

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/bundesAPI/deutschland.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/bundesAPI/deutschland.git)

Then import the package:

from deutschland import travelwarning

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

from deutschland import travelwarning

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import travelwarning
from pprint import pprint
from deutschland.travelwarning.api import default_api
from deutschland.travelwarning.model.response_address import ResponseAddress
from deutschland.travelwarning.model.response_download import ResponseDownload
from deutschland.travelwarning.model.response_warning import ResponseWarning
from deutschland.travelwarning.model.response_warnings import ResponseWarnings
# Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
# See configuration.py for a list of all supported configuration parameters.
configuration = travelwarning.Configuration(
    host = "https://www.auswaertiges-amt.de/opendata"
)



# Enter a context with an instance of the API client
with travelwarning.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    
    try:
        # Gibt die Merkblätter des Gesundheitsdienstes zurück
        api_response = api_instance.get_healthcare()
        pprint(api_response)
    except travelwarning.ApiException as e:
        print("Exception when calling DefaultApi->get_healthcare: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://www.auswaertiges-amt.de/opendata

Class Method HTTP request Description
DefaultApi get_healthcare GET /healthcare Gibt die Merkblätter des Gesundheitsdienstes zurück
DefaultApi get_representatives_country GET /representativesInCountry Gibt eine Liste der deutschen Vertretungen im Ausland zurück
DefaultApi get_representatives_germany GET /representativesInGermany Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück
DefaultApi get_single_travelwarning GET /travelwarning/{contentId} Gibt einen Reise- und Sicherheitshinweis zurück
DefaultApi get_state_names GET /stateNames Gibt das Verzeichnis der Staatennamen zurück
DefaultApi get_travelwarning GET /travelwarning Gibt alle Reise- und Sicherheitshinweise zurück

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in travelwarning.apis and travelwarning.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from deutschland.travelwarning.api.default_api import DefaultApi
  • from deutschland.travelwarning.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
from deutschland import travelwarning
from deutschland.travelwarning.apis import *
from deutschland.travelwarning.models import *