Base HERE API¶
Base classes shared by HERE API clients.
HEREApi
¶
Base class from which all wrappers inherit.
Source code in src/herepy/here_api.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
__aenter__()
async
¶
Open a shared async HTTP client for use by async API methods.
Source code in src/herepy/here_api.py
28 29 30 31 32 33 | |
__aexit__(exc_type, exc_value, traceback)
async
¶
Close the shared async HTTP client.
Source code in src/herepy/here_api.py
35 36 37 | |
__init__(api_key=None, timeout=None)
¶
Initialize the API client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
API key taken from HERE Developer Portal. |
None
|
timeout
|
int
|
Timeout limit for requests. |
None
|
Source code in src/herepy/here_api.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
__set_credentials(api_key)
¶
Setter for credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
API key taken from HERE Developer Portal. |
required |
Source code in src/herepy/here_api.py
51 52 53 54 55 56 57 58 59 60 | |
aclose()
async
¶
Close the shared async HTTP client.
Source code in src/herepy/here_api.py
39 40 41 42 43 44 | |