Mapbox

Prosa blabla…

Klassendiagramm

../../../_images/mapbox.png

Schnittstellen

class einsatzserver.mapbox.mapbox.GeoCode(address: str, lon: int, lat: int)
address: str
lon: int
lat: int
class einsatzserver.mapbox.mapbox.Direction(start: einsatzserver.mapbox.mapbox.GeoCode, end: einsatzserver.mapbox.mapbox.GeoCode, route: dict)
start: einsatzserver.mapbox.mapbox.GeoCode
end: einsatzserver.mapbox.mapbox.GeoCode
route: dict
einsatzserver.mapbox.mapbox.Session(access_token=None)

Create an HTTP session.

Parameters:
access_tokenstr

Mapbox access token string (optional).

envdict, optional

A dict that subsitutes for os.environ.

Returns:

requests.Session

class einsatzserver.mapbox.mapbox.MapBox(token: Optional[str] = None, host: Optional[str] = None)
default_host = 'api.mapbox.com'
api_name = 'api name'
api_version = 'v0'
property baseurl
property username

The username in the service’s access token

Returns:

username als str

handle_http_error(response, custom_messages=None, raise_for_status=False)

Converts service errors to Python exceptions

Parameters:
responserequests.Response

A service response.

custom_messagesdict, optional

A mapping of custom exception messages to HTTP status codes.

raise_for_statusbool, optional

If True, the requests library provides Python exceptions.