Releases: smartcar/python-sdk
v6.3.0
v6.2.0
6.2.0 (2022-03-24)
Bug Fixes
- ci: add support for Python 3.10 (4d63115)
Features
- smartcar: adds API v2.0 compatibility functionality to vehicle.get_compatibility method (bfc43cd)
This release also deprecates support for Python 3.6 as it has reached end-of-life. The next breaking change release of the SDK will drop
support for Python 3.6.
For more information about our supported python versions please see the following: https://github.com/smartcar/python-sdk#supported-python-branches
v6.1.0
v6.0.3
v6.0.2
v6.0.1
v6.0.0
6.0.0 (2021-07-12)
This is a major release consisting of multiple usability improvements and additional features.
We have aimed to streamline the SDK with the Smartcar API interfaces in a way that the objects returned are closer to the API interface documented in API Docs. For ex. vehicle.odometer() will now return an object that looks like the response in the documentation and additionally the body will contain response headers defined in the documentation as a part of a meta attribute.
The methods to be used are broadly divided into three namespaces :
smartcar- Top level package that contains application-level methods and classes.AuthClient- This class is used for all OAuth related operations.Vehicle- This class is used for all vehicle operations/actions.
Features
- Environment variables - The SDK now supports usage of environment variables for client id (
SMARTCAR_CLIENT_ID), client secret(SMARTCAR_CLIENT_SECRET) and redirect URL(SMARTCAR_REDIRECT_URL). These can be used instead of having to pass these as arguments. hash_challenge- Additional utility method defined insmartcarto generate hash challenge for webhooks.verify_payload- Additional utility method defined insmartcarto verify the payload returned by webhooks.get_api_version- Method defined insmartcarto return the api version set globally.subscribe- Additional method defined inVehiclenamespace to subscribe to a webhook.unsubscribe- Additional method defined inVehiclenamespace to unsubscribe from a webhook.- Default API version to 2.0 - The default version for the APIs is now
2.0instead of1.0. This can be overridden globally by using theset_api_versionmethod or by using optional arguments in different methods.
Improvements
Following are the improvements made to the interfaces by namespace. For in-depth details of the interface please refer to the documentation of the functions generated here.
smartcar
get_vehicles- Renamed fromget_vehicle_idsand changes in interface.get_user- Moved and renamed fromVehicle.get_user_idsand changes in interface.get_compatibility- Moved and renamed fromAuthClient.is_compatibleand changes in interface.
AuthClient
Constructor- This only requires the set of parameters required by all of the functions defined in the classget_auth_url- Takes in scope as required argument and all the other optional arguments required to generate the Smartcar Connect URL as defined in the docsexchange_code- Added additional support for optional flags parameter for future usage.exchange_refresh_token- Added additional support for optional flags parameter for future usage.
Vehicle
Constructor- Updated to now support a version parameter. Look at the interface for more details.attributes- Renamed frominfo.batch- The return value of the method has been changed. This now returns a function for each attributes requested that either returns an object of the requested attribute OR throws an error if the attribute returned an error.
SmartcarError
All the errors have been converged to a single SmartcarError class. This class can now support the error fields returned by v2.0 and v1.0. For detailed breakdown of both the error types, refer to the to the API Reference Errors section.
v5.2.1
5.2.1 (2021-04-24)
This release adds support for v2.0 of Smartcar's API by introducing the smartcar.set_api_version method.
We have also introduced a SmartcarExceptionV2 class whose fields match the error fields returned by v2.0 of the API as documented on the API Reference. This class extends the SmartcarException class to ease the migration process.
For a detailed breakdown of the changes and how to migrate see our API Changelog for v2.0 and our v2.0 Error Guides.
v5.2.0
feat: add set_api_version method and SmartcarExceptionV2 class This release adds support for v2.0 of Smartcar's API by introducing the `smartcar.set_api_version` method. We have also introduced a `SmartcarExceptionV2` class whose fields match the error fields returned by v2.0 of the API as documented on the [API Reference](https://smartcar.com/docs/api/?version=v2.0#errors). This class extends the `SmartcarException` class to ease the migration process. For a detailed breakdown of the changes and how to migrate see our [API Changelog for v2.0](https://smartcar.com/docs/changelog/v2.0/) and our [v2.0 Error Guides](https://smartcar.com/docs/errors/v2.0/billing). Co-authored-by: Gurpreet Atwal <[email protected]>