Skip to content

Releases: smartcar/python-sdk

v6.0.1

03 Aug 15:31
7fac8cf
Compare
Choose a tag to compare

6.0.1 (2021-08-03)

Bug Fixes

v6.0.0

12 Jul 16:54
32128df
Compare
Choose a tag to compare

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 in smartcar to generate hash challenge for webhooks.
  • verify_payload - Additional utility method defined in smartcar to verify the payload returned by webhooks.
  • get_api_version - Method defined in smartcar to return the api version set globally.
  • subscribe - Additional method defined in Vehicle namespace to subscribe to a webhook.
  • unsubscribe - Additional method defined in Vehicle namespace to unsubscribe from a webhook.
  • Default API version to 2.0 - The default version for the APIs is now 2.0 instead of 1.0 . This can be overridden globally by using the set_api_version method 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 from get_vehicle_ids and changes in interface.
  • get_user - Moved and renamed from Vehicle.get_user_ids and changes in interface.
  • get_compatibility - Moved and renamed from AuthClient.is_compatible and changes in interface.

AuthClient

  • Constructor - This only requires the set of parameters required by all of the functions defined in the class
  • get_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 docs
  • exchange_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 from info .
  • 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

24 Apr 01:05
Compare
Choose a tag to compare

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

24 Apr 03:18
905b1d8
Compare
Choose a tag to compare
v5.2.0 Pre-release
Pre-release
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 <git@gatwal.com>

v5.1.1

15 Feb 22:03
c87ddfe
Compare
Choose a tag to compare

5.1.1 (2021-02-15)

Bug Fixes

  • battery capacity parsing bad header (#90) (c87ddfe)

v5.1.0

04 Jan 18:26
c95a5cc
Compare
Choose a tag to compare

5.1.0 (2021-01-04)

Features

  • battery-capacity: adding battery capacity method to vehicle (#87) (d085fdc)

v5.0.0

22 Oct 01:14
Compare
Choose a tag to compare

5.0.0 (2020-10-22)

Bug Fixes

  • errors: wrap all unexpected requestor errors in SmartcarException (1eb30cd)

chore

  • ci: drop support for Python 2.7, 3.4, and 3.5 (0017410)

Features

  • request-id: set request_id as a property on SmartcarException (0a181c8)

BREAKING CHANGES

Python 2.7, 3.4, and 3.5 hit end-of-life support, so we are dropping support for it in the Smartcar SDK.

This makes way to allow for new syntax and features only available starting in Python 3.x

v4.3.5

02 Oct 01:33
87dd890
Compare
Choose a tag to compare

4.3.5 (2020-10-02)

Bug Fixes

v4.3.4

02 Oct 01:15
14e6281
Compare
Choose a tag to compare

4.3.4 (2020-10-02)

Bug Fixes

  • ci: setup semantic-release for releasing (#82) (14e6281), closes #81

v4.0.0

18 Jul 00:04
91c57db
Compare
Choose a tag to compare

4.0.0 (2019-07-17)

Features

  • Add Fuel and EV Support (91c57db)

BREAKING CHANGES

  • NotCapableException has been split into VehicleNotCapableException and SmartcarNotCapableException. Please read the docs and update your exception handling to reflect this change.