xyzspaces.iml.apis.aaa_oauth2_api module¶
This module contains an AAAOauth2ApiClient
class to perform oauth API operations.
The HERE API reference documentation used in this module can be found here: IAM API Reference # noqa
- class xyzspaces.iml.apis.aaa_oauth2_api.AAAOauth2Api(base_url, proxies=None)[source]¶
Bases:
xyzspaces.iml.apis.api.Api
This class provides access to HERE platform AAA Oauth2 APIs.
- Parameters
base_url (str) –
proxies (Optional[dict]) –
- request_scoped_access_token(oauth, data)[source]¶
Request scoped access oauth2 token from platform.
- Parameters
oauth (requests_oauthlib.oauth1_auth.OAuth1) – oauth1 configuration.
data (str) – a string which represents request body.
- Returns
a json with scoped access token.
- Raises
TooManyRequestsException – If the status code of the HTTP response is 429
AuthenticationException – If platform responds with HTTP 401 or 403.
RuntimeError – If platform does not respond with HTTP 200.
- Return type
Dict