tesla-api-sdk 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tesla_api_sdk-1.0.0/tesla_api_sdk.egg-info → tesla_api_sdk-1.0.2}/PKG-INFO +40 -34
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/README.md +39 -33
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/pyproject.toml +1 -1
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2/tesla_api_sdk.egg-info}/PKG-INFO +40 -34
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/tesla_api_sdk.egg-info/SOURCES.txt +15 -5
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/configuration.py +13 -11
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/__init__.py +2 -1
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/base_controller.py +1 -1
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/charging_controller.py +6 -3
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/energy_controller.py +14 -11
- tesla_api_sdk-1.0.0/teslafleetmanagementapi/controllers/oauth_authorization_controller.py → tesla_api_sdk-1.0.2/teslafleetmanagementapi/controllers/o_auth_authorization_controller.py +24 -24
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/partner_controller.py +7 -4
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/user_controller.py +7 -4
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/controllers/vehicle_commands_controller.py +891 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/vehicles_controller.py +24 -21
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/exceptions/__init__.py +1 -1
- tesla_api_sdk-1.0.0/teslafleetmanagementapi/exceptions/oauth_provider_exception.py → tesla_api_sdk-1.0.2/teslafleetmanagementapi/exceptions/o_auth_provider_exception.py +3 -3
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/auth/__init__.py +1 -1
- tesla_api_sdk-1.0.0/teslafleetmanagementapi/http/auth/oauth_2.py → tesla_api_sdk-1.0.2/teslafleetmanagementapi/http/auth/thirdpartytoken.py +111 -82
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/__init__.py +12 -3
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/actuate_trunk_request.py +92 -0
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/add_charge_schedule_request.py +272 -0
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/add_precondition_schedule_request.py +203 -0
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/adjust_volume_request.py +92 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +1 -1
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/command_response.py +109 -0
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/command_result.py +105 -0
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/guest_mode_request.py +92 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +1 -1
- tesla_api_sdk-1.0.0/teslafleetmanagementapi/models/oauth_provider_error.py → tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/o_auth_provider_error.py +1 -1
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/o_auth_scope_thirdpartytoken.py +84 -0
- tesla_api_sdk-1.0.0/teslafleetmanagementapi/models/oauth_token.py → tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/o_auth_token.py +2 -2
- tesla_api_sdk-1.0.2/teslafleetmanagementapi/models/which_trunk.py +45 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/teslafleetmanagementapi_client.py +23 -14
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/LICENSE +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/MANIFEST.in +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/setup.cfg +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/tesla_api_sdk.egg-info/dependency_links.txt +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/tesla_api_sdk.egg-info/requires.txt +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/tesla_api_sdk.egg-info/top_level.txt +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/__init__.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/api_helper.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/exceptions/api_exception.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/__init__.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/api_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/auth/bearer_auth.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/http_call_back.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/http_client_provider.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/http_method_enum.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/http_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/http_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/http/proxy_settings.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/logging/__init__.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/logging/configuration/__init__.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/logging/configuration/api_logging_configuration.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/logging/sdk_logger.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_dx_vehicles_options_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_dx_warranty_details_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_vehicles_mobile_enabled_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_vehicles_nearby_charging_sites_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_vehicles_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/api_1_vehicles_wake_up_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/backup_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/backup_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/calendar_history_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charge_duration.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charge_history.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charge_history_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charge_start_time.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_dimension.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_fee.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_history_data.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_history_item.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_history_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_invoice.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_location.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_period.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_session.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_sessions_data.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/charging_sessions_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/default_real_mode.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/driver.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/drivers_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/enterprise_payer_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/event.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/fleet_status_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/fleet_telemetry_error.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/fleet_telemetry_errors_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/fleet_telemetry_jws_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/generic_update_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/kind.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/live_status_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/location.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/location_1.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/me_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/mobile_enabled.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/off_grid_vehicle_charging_reserve_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/operation_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/orders_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/pagination.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/price_component.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/products_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/public_key_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/region_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/register_partner_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/register_partner_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_1.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_2.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_3.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_api_1_dx_vehicles_options_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_api_1_dx_warranty_details_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_calendar_history_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_charge_history_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_fleet_telemetry_errors_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_live_status_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_me_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_orders_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_public_key_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_region_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/response_register_partner_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/signaling.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/simple_ok_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/site_info_response.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/storm_mode_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/tariff_element.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/tariffs.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/time_of_use_settings_request.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/total_cost.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/tou_settings.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/vehicle_base.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/vehicle_option.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/models/warranty_item.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/utilities/__init__.py +0 -0
- {tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/utilities/file_wrapper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tesla-api-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Tesla-API SDK
|
|
5
5
|
Author-email: Muhammad Rafay <muhammad.rafay@apimatic.io>
|
|
6
6
|
Project-URL: Documentation, https://developer.tesla.com/
|
|
@@ -28,15 +28,15 @@ The package is compatible with Python versions `3.7+`.
|
|
|
28
28
|
Install the package from PyPi using the following pip command:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
pip install tesla-api-sdk==1.0.
|
|
31
|
+
pip install tesla-api-sdk==1.0.2
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
You can also view the package at:
|
|
35
|
-
https://pypi.python.org/pypi/tesla-api-sdk/1.0.
|
|
35
|
+
https://pypi.python.org/pypi/tesla-api-sdk/1.0.2
|
|
36
36
|
|
|
37
37
|
## Initialize the API Client
|
|
38
38
|
|
|
39
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
39
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/client.md)
|
|
40
40
|
|
|
41
41
|
The following parameters are configurable for the API Client:
|
|
42
42
|
|
|
@@ -51,10 +51,10 @@ The following parameters are configurable for the API Client:
|
|
|
51
51
|
| backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
|
|
52
52
|
| retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
53
53
|
| retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
|
|
54
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
55
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
56
|
-
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
57
|
-
|
|
|
54
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
55
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
56
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
57
|
+
| thirdpartytoken_credentials | [`ThirdpartytokenCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md) | The credential object for OAuth 2 Authorization Code Grant |
|
|
58
58
|
|
|
59
59
|
The API client can be initialized as follows:
|
|
60
60
|
|
|
@@ -65,20 +65,25 @@ import logging
|
|
|
65
65
|
|
|
66
66
|
from teslafleetmanagementapi.configuration import Environment
|
|
67
67
|
from teslafleetmanagementapi.http.auth.bearer_auth import BearerAuthCredentials
|
|
68
|
-
from teslafleetmanagementapi.http.auth.
|
|
68
|
+
from teslafleetmanagementapi.http.auth.thirdpartytoken import ThirdpartytokenCredentials
|
|
69
69
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import LoggingConfiguration
|
|
70
70
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
|
|
71
71
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
|
|
72
|
+
from teslafleetmanagementapi.models.o_auth_scope_thirdpartytoken import OAuthScopeThirdpartytoken
|
|
72
73
|
from teslafleetmanagementapi.teslafleetmanagementapi_client import TeslafleetmanagementapiClient
|
|
73
74
|
|
|
74
75
|
client = TeslafleetmanagementapiClient(
|
|
75
76
|
bearer_auth_credentials=BearerAuthCredentials(
|
|
76
77
|
access_token='AccessToken'
|
|
77
78
|
),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
thirdpartytoken_credentials=ThirdpartytokenCredentials(
|
|
80
|
+
o_auth_client_id='OAuthClientId',
|
|
81
|
+
o_auth_client_secret='OAuthClientSecret',
|
|
82
|
+
o_auth_redirect_uri='OAuthRedirectUri',
|
|
83
|
+
o_auth_scopes=[
|
|
84
|
+
OAuthScopeThirdpartytoken.OPENID,
|
|
85
|
+
OAuthScopeThirdpartytoken.OFFLINE_ACCESS
|
|
86
|
+
]
|
|
82
87
|
),
|
|
83
88
|
environment=Environment.PRODUCTION,
|
|
84
89
|
logging_configuration=LoggingConfiguration(
|
|
@@ -102,44 +107,45 @@ from teslafleetmanagementapi.teslafleetmanagementapi_client import Teslafleetman
|
|
|
102
107
|
client = TeslafleetmanagementapiClient.from_environment(dotenv_path='/path/to/.env')
|
|
103
108
|
```
|
|
104
109
|
|
|
105
|
-
See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
110
|
+
See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md) section for details.
|
|
106
111
|
|
|
107
112
|
## Authorization
|
|
108
113
|
|
|
109
114
|
This API uses the following authentication schemes.
|
|
110
115
|
|
|
111
|
-
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
112
|
-
* [`
|
|
116
|
+
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md)
|
|
117
|
+
* [`thirdpartytoken (OAuth 2 Authorization Code Grant)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md)
|
|
113
118
|
|
|
114
119
|
## List of APIs
|
|
115
120
|
|
|
116
|
-
* [
|
|
117
|
-
* [
|
|
118
|
-
* [
|
|
119
|
-
* [
|
|
120
|
-
* [
|
|
121
|
+
* [Vehicle Commands](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicle-commands.md)
|
|
122
|
+
* [Charging](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/charging.md)
|
|
123
|
+
* [Energy](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/energy.md)
|
|
124
|
+
* [Partner](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/partner.md)
|
|
125
|
+
* [User](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/user.md)
|
|
126
|
+
* [Vehicles](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicles.md)
|
|
121
127
|
|
|
122
128
|
## SDK Infrastructure
|
|
123
129
|
|
|
124
130
|
### Configuration
|
|
125
131
|
|
|
126
|
-
* [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
127
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
128
|
-
* [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
129
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
130
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
131
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
132
|
+
* [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md)
|
|
133
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md)
|
|
134
|
+
* [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/abstract-logger.md)
|
|
135
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md)
|
|
136
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/request-logging-configuration.md)
|
|
137
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/response-logging-configuration.md)
|
|
132
138
|
|
|
133
139
|
### HTTP
|
|
134
140
|
|
|
135
|
-
* [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
136
|
-
* [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
141
|
+
* [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-response.md)
|
|
142
|
+
* [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-request.md)
|
|
137
143
|
|
|
138
144
|
### Utilities
|
|
139
145
|
|
|
140
|
-
* [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
141
|
-
* [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
142
|
-
* [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
143
|
-
* [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
144
|
-
* [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
146
|
+
* [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-response.md)
|
|
147
|
+
* [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-helper.md)
|
|
148
|
+
* [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-date-time.md)
|
|
149
|
+
* [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/rfc3339-date-time.md)
|
|
150
|
+
* [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/unix-date-time.md)
|
|
145
151
|
|
|
@@ -11,15 +11,15 @@ The package is compatible with Python versions `3.7+`.
|
|
|
11
11
|
Install the package from PyPi using the following pip command:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
pip install tesla-api-sdk==1.0.
|
|
14
|
+
pip install tesla-api-sdk==1.0.2
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
You can also view the package at:
|
|
18
|
-
https://pypi.python.org/pypi/tesla-api-sdk/1.0.
|
|
18
|
+
https://pypi.python.org/pypi/tesla-api-sdk/1.0.2
|
|
19
19
|
|
|
20
20
|
## Initialize the API Client
|
|
21
21
|
|
|
22
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
22
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/client.md)
|
|
23
23
|
|
|
24
24
|
The following parameters are configurable for the API Client:
|
|
25
25
|
|
|
@@ -34,10 +34,10 @@ The following parameters are configurable for the API Client:
|
|
|
34
34
|
| backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
|
|
35
35
|
| retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
36
36
|
| retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
|
|
37
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
38
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
39
|
-
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
40
|
-
|
|
|
37
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
38
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
39
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
40
|
+
| thirdpartytoken_credentials | [`ThirdpartytokenCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md) | The credential object for OAuth 2 Authorization Code Grant |
|
|
41
41
|
|
|
42
42
|
The API client can be initialized as follows:
|
|
43
43
|
|
|
@@ -48,20 +48,25 @@ import logging
|
|
|
48
48
|
|
|
49
49
|
from teslafleetmanagementapi.configuration import Environment
|
|
50
50
|
from teslafleetmanagementapi.http.auth.bearer_auth import BearerAuthCredentials
|
|
51
|
-
from teslafleetmanagementapi.http.auth.
|
|
51
|
+
from teslafleetmanagementapi.http.auth.thirdpartytoken import ThirdpartytokenCredentials
|
|
52
52
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import LoggingConfiguration
|
|
53
53
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
|
|
54
54
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
|
|
55
|
+
from teslafleetmanagementapi.models.o_auth_scope_thirdpartytoken import OAuthScopeThirdpartytoken
|
|
55
56
|
from teslafleetmanagementapi.teslafleetmanagementapi_client import TeslafleetmanagementapiClient
|
|
56
57
|
|
|
57
58
|
client = TeslafleetmanagementapiClient(
|
|
58
59
|
bearer_auth_credentials=BearerAuthCredentials(
|
|
59
60
|
access_token='AccessToken'
|
|
60
61
|
),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
thirdpartytoken_credentials=ThirdpartytokenCredentials(
|
|
63
|
+
o_auth_client_id='OAuthClientId',
|
|
64
|
+
o_auth_client_secret='OAuthClientSecret',
|
|
65
|
+
o_auth_redirect_uri='OAuthRedirectUri',
|
|
66
|
+
o_auth_scopes=[
|
|
67
|
+
OAuthScopeThirdpartytoken.OPENID,
|
|
68
|
+
OAuthScopeThirdpartytoken.OFFLINE_ACCESS
|
|
69
|
+
]
|
|
65
70
|
),
|
|
66
71
|
environment=Environment.PRODUCTION,
|
|
67
72
|
logging_configuration=LoggingConfiguration(
|
|
@@ -85,44 +90,45 @@ from teslafleetmanagementapi.teslafleetmanagementapi_client import Teslafleetman
|
|
|
85
90
|
client = TeslafleetmanagementapiClient.from_environment(dotenv_path='/path/to/.env')
|
|
86
91
|
```
|
|
87
92
|
|
|
88
|
-
See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
93
|
+
See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md) section for details.
|
|
89
94
|
|
|
90
95
|
## Authorization
|
|
91
96
|
|
|
92
97
|
This API uses the following authentication schemes.
|
|
93
98
|
|
|
94
|
-
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
95
|
-
* [`
|
|
99
|
+
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md)
|
|
100
|
+
* [`thirdpartytoken (OAuth 2 Authorization Code Grant)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md)
|
|
96
101
|
|
|
97
102
|
## List of APIs
|
|
98
103
|
|
|
99
|
-
* [
|
|
100
|
-
* [
|
|
101
|
-
* [
|
|
102
|
-
* [
|
|
103
|
-
* [
|
|
104
|
+
* [Vehicle Commands](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicle-commands.md)
|
|
105
|
+
* [Charging](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/charging.md)
|
|
106
|
+
* [Energy](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/energy.md)
|
|
107
|
+
* [Partner](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/partner.md)
|
|
108
|
+
* [User](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/user.md)
|
|
109
|
+
* [Vehicles](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicles.md)
|
|
104
110
|
|
|
105
111
|
## SDK Infrastructure
|
|
106
112
|
|
|
107
113
|
### Configuration
|
|
108
114
|
|
|
109
|
-
* [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
110
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
111
|
-
* [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
112
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
113
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
114
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
115
|
+
* [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md)
|
|
116
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md)
|
|
117
|
+
* [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/abstract-logger.md)
|
|
118
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md)
|
|
119
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/request-logging-configuration.md)
|
|
120
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/response-logging-configuration.md)
|
|
115
121
|
|
|
116
122
|
### HTTP
|
|
117
123
|
|
|
118
|
-
* [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
119
|
-
* [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
124
|
+
* [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-response.md)
|
|
125
|
+
* [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-request.md)
|
|
120
126
|
|
|
121
127
|
### Utilities
|
|
122
128
|
|
|
123
|
-
* [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
124
|
-
* [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
125
|
-
* [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
126
|
-
* [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
127
|
-
* [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
129
|
+
* [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-response.md)
|
|
130
|
+
* [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-helper.md)
|
|
131
|
+
* [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-date-time.md)
|
|
132
|
+
* [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/rfc3339-date-time.md)
|
|
133
|
+
* [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/unix-date-time.md)
|
|
128
134
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
[project]
|
|
5
5
|
name = "tesla-api-sdk"
|
|
6
6
|
description = "Tesla-API SDK"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
keywords = []
|
|
10
10
|
dependencies = ["apimatic-core~=0.2.0, >= 0.2.24", "apimatic-core-interfaces~=0.1.0, >= 0.1.8", "apimatic-requests-client-adapter~=0.1.0, >= 0.1.10", "python-dotenv>=0.21, <2.0"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tesla-api-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Tesla-API SDK
|
|
5
5
|
Author-email: Muhammad Rafay <muhammad.rafay@apimatic.io>
|
|
6
6
|
Project-URL: Documentation, https://developer.tesla.com/
|
|
@@ -28,15 +28,15 @@ The package is compatible with Python versions `3.7+`.
|
|
|
28
28
|
Install the package from PyPi using the following pip command:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
pip install tesla-api-sdk==1.0.
|
|
31
|
+
pip install tesla-api-sdk==1.0.2
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
You can also view the package at:
|
|
35
|
-
https://pypi.python.org/pypi/tesla-api-sdk/1.0.
|
|
35
|
+
https://pypi.python.org/pypi/tesla-api-sdk/1.0.2
|
|
36
36
|
|
|
37
37
|
## Initialize the API Client
|
|
38
38
|
|
|
39
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
39
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/client.md)
|
|
40
40
|
|
|
41
41
|
The following parameters are configurable for the API Client:
|
|
42
42
|
|
|
@@ -51,10 +51,10 @@ The following parameters are configurable for the API Client:
|
|
|
51
51
|
| backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
|
|
52
52
|
| retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
53
53
|
| retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
|
|
54
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
55
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
56
|
-
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
57
|
-
|
|
|
54
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
55
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
56
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
57
|
+
| thirdpartytoken_credentials | [`ThirdpartytokenCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md) | The credential object for OAuth 2 Authorization Code Grant |
|
|
58
58
|
|
|
59
59
|
The API client can be initialized as follows:
|
|
60
60
|
|
|
@@ -65,20 +65,25 @@ import logging
|
|
|
65
65
|
|
|
66
66
|
from teslafleetmanagementapi.configuration import Environment
|
|
67
67
|
from teslafleetmanagementapi.http.auth.bearer_auth import BearerAuthCredentials
|
|
68
|
-
from teslafleetmanagementapi.http.auth.
|
|
68
|
+
from teslafleetmanagementapi.http.auth.thirdpartytoken import ThirdpartytokenCredentials
|
|
69
69
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import LoggingConfiguration
|
|
70
70
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
|
|
71
71
|
from teslafleetmanagementapi.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
|
|
72
|
+
from teslafleetmanagementapi.models.o_auth_scope_thirdpartytoken import OAuthScopeThirdpartytoken
|
|
72
73
|
from teslafleetmanagementapi.teslafleetmanagementapi_client import TeslafleetmanagementapiClient
|
|
73
74
|
|
|
74
75
|
client = TeslafleetmanagementapiClient(
|
|
75
76
|
bearer_auth_credentials=BearerAuthCredentials(
|
|
76
77
|
access_token='AccessToken'
|
|
77
78
|
),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
thirdpartytoken_credentials=ThirdpartytokenCredentials(
|
|
80
|
+
o_auth_client_id='OAuthClientId',
|
|
81
|
+
o_auth_client_secret='OAuthClientSecret',
|
|
82
|
+
o_auth_redirect_uri='OAuthRedirectUri',
|
|
83
|
+
o_auth_scopes=[
|
|
84
|
+
OAuthScopeThirdpartytoken.OPENID,
|
|
85
|
+
OAuthScopeThirdpartytoken.OFFLINE_ACCESS
|
|
86
|
+
]
|
|
82
87
|
),
|
|
83
88
|
environment=Environment.PRODUCTION,
|
|
84
89
|
logging_configuration=LoggingConfiguration(
|
|
@@ -102,44 +107,45 @@ from teslafleetmanagementapi.teslafleetmanagementapi_client import Teslafleetman
|
|
|
102
107
|
client = TeslafleetmanagementapiClient.from_environment(dotenv_path='/path/to/.env')
|
|
103
108
|
```
|
|
104
109
|
|
|
105
|
-
See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
110
|
+
See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md) section for details.
|
|
106
111
|
|
|
107
112
|
## Authorization
|
|
108
113
|
|
|
109
114
|
This API uses the following authentication schemes.
|
|
110
115
|
|
|
111
|
-
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
112
|
-
* [`
|
|
116
|
+
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md)
|
|
117
|
+
* [`thirdpartytoken (OAuth 2 Authorization Code Grant)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md)
|
|
113
118
|
|
|
114
119
|
## List of APIs
|
|
115
120
|
|
|
116
|
-
* [
|
|
117
|
-
* [
|
|
118
|
-
* [
|
|
119
|
-
* [
|
|
120
|
-
* [
|
|
121
|
+
* [Vehicle Commands](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicle-commands.md)
|
|
122
|
+
* [Charging](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/charging.md)
|
|
123
|
+
* [Energy](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/energy.md)
|
|
124
|
+
* [Partner](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/partner.md)
|
|
125
|
+
* [User](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/user.md)
|
|
126
|
+
* [Vehicles](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicles.md)
|
|
121
127
|
|
|
122
128
|
## SDK Infrastructure
|
|
123
129
|
|
|
124
130
|
### Configuration
|
|
125
131
|
|
|
126
|
-
* [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
127
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
128
|
-
* [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
129
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
130
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
131
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
132
|
+
* [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md)
|
|
133
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md)
|
|
134
|
+
* [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/abstract-logger.md)
|
|
135
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md)
|
|
136
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/request-logging-configuration.md)
|
|
137
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/response-logging-configuration.md)
|
|
132
138
|
|
|
133
139
|
### HTTP
|
|
134
140
|
|
|
135
|
-
* [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
136
|
-
* [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
141
|
+
* [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-response.md)
|
|
142
|
+
* [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-request.md)
|
|
137
143
|
|
|
138
144
|
### Utilities
|
|
139
145
|
|
|
140
|
-
* [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
141
|
-
* [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
142
|
-
* [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
143
|
-
* [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
144
|
-
* [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.
|
|
146
|
+
* [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-response.md)
|
|
147
|
+
* [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-helper.md)
|
|
148
|
+
* [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-date-time.md)
|
|
149
|
+
* [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/rfc3339-date-time.md)
|
|
150
|
+
* [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/unix-date-time.md)
|
|
145
151
|
|
|
@@ -16,13 +16,14 @@ teslafleetmanagementapi/controllers/__init__.py
|
|
|
16
16
|
teslafleetmanagementapi/controllers/base_controller.py
|
|
17
17
|
teslafleetmanagementapi/controllers/charging_controller.py
|
|
18
18
|
teslafleetmanagementapi/controllers/energy_controller.py
|
|
19
|
-
teslafleetmanagementapi/controllers/
|
|
19
|
+
teslafleetmanagementapi/controllers/o_auth_authorization_controller.py
|
|
20
20
|
teslafleetmanagementapi/controllers/partner_controller.py
|
|
21
21
|
teslafleetmanagementapi/controllers/user_controller.py
|
|
22
|
+
teslafleetmanagementapi/controllers/vehicle_commands_controller.py
|
|
22
23
|
teslafleetmanagementapi/controllers/vehicles_controller.py
|
|
23
24
|
teslafleetmanagementapi/exceptions/__init__.py
|
|
24
25
|
teslafleetmanagementapi/exceptions/api_exception.py
|
|
25
|
-
teslafleetmanagementapi/exceptions/
|
|
26
|
+
teslafleetmanagementapi/exceptions/o_auth_provider_exception.py
|
|
26
27
|
teslafleetmanagementapi/http/__init__.py
|
|
27
28
|
teslafleetmanagementapi/http/api_response.py
|
|
28
29
|
teslafleetmanagementapi/http/http_call_back.py
|
|
@@ -33,12 +34,16 @@ teslafleetmanagementapi/http/http_response.py
|
|
|
33
34
|
teslafleetmanagementapi/http/proxy_settings.py
|
|
34
35
|
teslafleetmanagementapi/http/auth/__init__.py
|
|
35
36
|
teslafleetmanagementapi/http/auth/bearer_auth.py
|
|
36
|
-
teslafleetmanagementapi/http/auth/
|
|
37
|
+
teslafleetmanagementapi/http/auth/thirdpartytoken.py
|
|
37
38
|
teslafleetmanagementapi/logging/__init__.py
|
|
38
39
|
teslafleetmanagementapi/logging/sdk_logger.py
|
|
39
40
|
teslafleetmanagementapi/logging/configuration/__init__.py
|
|
40
41
|
teslafleetmanagementapi/logging/configuration/api_logging_configuration.py
|
|
41
42
|
teslafleetmanagementapi/models/__init__.py
|
|
43
|
+
teslafleetmanagementapi/models/actuate_trunk_request.py
|
|
44
|
+
teslafleetmanagementapi/models/add_charge_schedule_request.py
|
|
45
|
+
teslafleetmanagementapi/models/add_precondition_schedule_request.py
|
|
46
|
+
teslafleetmanagementapi/models/adjust_volume_request.py
|
|
42
47
|
teslafleetmanagementapi/models/api_1_dx_vehicles_options_response.py
|
|
43
48
|
teslafleetmanagementapi/models/api_1_dx_warranty_details_response.py
|
|
44
49
|
teslafleetmanagementapi/models/api_1_vehicles_mobile_enabled_response.py
|
|
@@ -64,6 +69,8 @@ teslafleetmanagementapi/models/charging_period.py
|
|
|
64
69
|
teslafleetmanagementapi/models/charging_session.py
|
|
65
70
|
teslafleetmanagementapi/models/charging_sessions_data.py
|
|
66
71
|
teslafleetmanagementapi/models/charging_sessions_response.py
|
|
72
|
+
teslafleetmanagementapi/models/command_response.py
|
|
73
|
+
teslafleetmanagementapi/models/command_result.py
|
|
67
74
|
teslafleetmanagementapi/models/default_real_mode.py
|
|
68
75
|
teslafleetmanagementapi/models/driver.py
|
|
69
76
|
teslafleetmanagementapi/models/drivers_response.py
|
|
@@ -74,6 +81,7 @@ teslafleetmanagementapi/models/fleet_telemetry_error.py
|
|
|
74
81
|
teslafleetmanagementapi/models/fleet_telemetry_errors_response.py
|
|
75
82
|
teslafleetmanagementapi/models/fleet_telemetry_jws_request.py
|
|
76
83
|
teslafleetmanagementapi/models/generic_update_response.py
|
|
84
|
+
teslafleetmanagementapi/models/guest_mode_request.py
|
|
77
85
|
teslafleetmanagementapi/models/kind.py
|
|
78
86
|
teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py
|
|
79
87
|
teslafleetmanagementapi/models/live_status_response.py
|
|
@@ -81,8 +89,9 @@ teslafleetmanagementapi/models/location.py
|
|
|
81
89
|
teslafleetmanagementapi/models/location_1.py
|
|
82
90
|
teslafleetmanagementapi/models/me_response.py
|
|
83
91
|
teslafleetmanagementapi/models/mobile_enabled.py
|
|
84
|
-
teslafleetmanagementapi/models/
|
|
85
|
-
teslafleetmanagementapi/models/
|
|
92
|
+
teslafleetmanagementapi/models/o_auth_provider_error.py
|
|
93
|
+
teslafleetmanagementapi/models/o_auth_scope_thirdpartytoken.py
|
|
94
|
+
teslafleetmanagementapi/models/o_auth_token.py
|
|
86
95
|
teslafleetmanagementapi/models/off_grid_vehicle_charging_reserve_request.py
|
|
87
96
|
teslafleetmanagementapi/models/operation_request.py
|
|
88
97
|
teslafleetmanagementapi/models/orders_response.py
|
|
@@ -120,5 +129,6 @@ teslafleetmanagementapi/models/tou_settings.py
|
|
|
120
129
|
teslafleetmanagementapi/models/vehicle_base.py
|
|
121
130
|
teslafleetmanagementapi/models/vehicle_option.py
|
|
122
131
|
teslafleetmanagementapi/models/warranty_item.py
|
|
132
|
+
teslafleetmanagementapi/models/which_trunk.py
|
|
123
133
|
teslafleetmanagementapi/utilities/__init__.py
|
|
124
134
|
teslafleetmanagementapi/utilities/file_wrapper.py
|
|
@@ -107,16 +107,16 @@ class Configuration(HttpClientConfiguration):
|
|
|
107
107
|
return self._bearer_auth_credentials
|
|
108
108
|
|
|
109
109
|
@property
|
|
110
|
-
def
|
|
111
|
-
"""Return current
|
|
112
|
-
return self.
|
|
110
|
+
def thirdpartytoken_credentials(self):
|
|
111
|
+
"""Return current thirdpartytoken_credentials."""
|
|
112
|
+
return self._thirdpartytoken_credentials
|
|
113
113
|
|
|
114
114
|
def __init__(self, http_client_instance=None,
|
|
115
115
|
override_http_client_configuration=False, http_call_back=None,
|
|
116
116
|
timeout=60, max_retries=0, backoff_factor=2, retry_statuses=None,
|
|
117
117
|
retry_methods=None, proxy_settings=None, logging_configuration=None,
|
|
118
118
|
environment=Environment.PRODUCTION, bearer_auth_credentials=None,
|
|
119
|
-
|
|
119
|
+
thirdpartytoken_credentials=None):
|
|
120
120
|
"""Initialize Configuration object."""
|
|
121
121
|
if retry_methods is None:
|
|
122
122
|
retry_methods = ["GET", "PUT"]
|
|
@@ -142,7 +142,7 @@ class Configuration(HttpClientConfiguration):
|
|
|
142
142
|
self._bearer_auth_credentials = bearer_auth_credentials
|
|
143
143
|
|
|
144
144
|
# The object holding OAuth 2 Authorization Code Grant credentials
|
|
145
|
-
self.
|
|
145
|
+
self._thirdpartytoken_credentials = thirdpartytoken_credentials
|
|
146
146
|
|
|
147
147
|
# The Http Client to use for making requests.
|
|
148
148
|
self.set_http_client(self.create_http_client())
|
|
@@ -152,7 +152,7 @@ class Configuration(HttpClientConfiguration):
|
|
|
152
152
|
timeout=None, max_retries=None, backoff_factor=None,
|
|
153
153
|
retry_statuses=None, retry_methods=None, proxy_settings=None,
|
|
154
154
|
logging_configuration=None, environment=None,
|
|
155
|
-
bearer_auth_credentials=None,
|
|
155
|
+
bearer_auth_credentials=None, thirdpartytoken_credentials=None):
|
|
156
156
|
"""Clone configuration with overrides."""
|
|
157
157
|
http_client_instance = http_client_instance or self.http_client_instance
|
|
158
158
|
override_http_client_configuration =\
|
|
@@ -170,7 +170,9 @@ class Configuration(HttpClientConfiguration):
|
|
|
170
170
|
bearer_auth_credentials =\
|
|
171
171
|
(bearer_auth_credentials
|
|
172
172
|
or self.bearer_auth_credentials)
|
|
173
|
-
|
|
173
|
+
thirdpartytoken_credentials =\
|
|
174
|
+
(thirdpartytoken_credentials
|
|
175
|
+
or self.thirdpartytoken_credentials)
|
|
174
176
|
return Configuration(
|
|
175
177
|
http_client_instance=http_client_instance,
|
|
176
178
|
override_http_client_configuration=override_http_client_configuration,
|
|
@@ -179,7 +181,7 @@ class Configuration(HttpClientConfiguration):
|
|
|
179
181
|
retry_methods=retry_methods, proxy_settings=proxy_settings,
|
|
180
182
|
logging_configuration=logging_configuration, environment=environment,
|
|
181
183
|
bearer_auth_credentials=bearer_auth_credentials,
|
|
182
|
-
|
|
184
|
+
thirdpartytoken_credentials=thirdpartytoken_credentials,
|
|
183
185
|
)
|
|
184
186
|
|
|
185
187
|
def create_http_client(self):
|
|
@@ -248,8 +250,8 @@ class Configuration(HttpClientConfiguration):
|
|
|
248
250
|
from teslafleetmanagementapi.http.auth.bearer_auth import (
|
|
249
251
|
BearerAuthCredentials,
|
|
250
252
|
)
|
|
251
|
-
from teslafleetmanagementapi.http.auth.
|
|
252
|
-
|
|
253
|
+
from teslafleetmanagementapi.http.auth.thirdpartytoken import (
|
|
254
|
+
ThirdpartytokenCredentials,
|
|
253
255
|
)
|
|
254
256
|
|
|
255
257
|
# Preparing default configuration
|
|
@@ -264,7 +266,7 @@ class Configuration(HttpClientConfiguration):
|
|
|
264
266
|
proxy_settings=ProxySettings.from_environment(),
|
|
265
267
|
logging_configuration=LoggingConfiguration.from_environment(),
|
|
266
268
|
bearer_auth_credentials=BearerAuthCredentials.from_environment(),
|
|
267
|
-
|
|
269
|
+
thirdpartytoken_credentials=ThirdpartytokenCredentials.from_environment(),
|
|
268
270
|
)
|
|
269
271
|
|
|
270
272
|
return default_config.clone_with(**overrides)
|
|
@@ -4,8 +4,9 @@ __all__ = [
|
|
|
4
4
|
"base_controller",
|
|
5
5
|
"charging_controller",
|
|
6
6
|
"energy_controller",
|
|
7
|
-
"
|
|
7
|
+
"o_auth_authorization_controller",
|
|
8
8
|
"partner_controller",
|
|
9
9
|
"user_controller",
|
|
10
|
+
"vehicle_commands_controller",
|
|
10
11
|
"vehicles_controller",
|
|
11
12
|
]
|
{tesla_api_sdk-1.0.0 → tesla_api_sdk-1.0.2}/teslafleetmanagementapi/controllers/base_controller.py
RENAMED
|
@@ -30,7 +30,7 @@ class BaseController(object):
|
|
|
30
30
|
@staticmethod
|
|
31
31
|
def user_agent():
|
|
32
32
|
"""Return UserAgent value."""
|
|
33
|
-
return "Python SDK, Version: 1.0.
|
|
33
|
+
return "Python SDK, Version: 1.0.2, on OS {os-info}"
|
|
34
34
|
|
|
35
35
|
@staticmethod
|
|
36
36
|
def user_agent_parameters():
|