adafruit / Adafruit_IO_Python

Adafruit IO Python Client Library
Other
225 stars 99 forks source link

Updated client to use a version property (defaults to API v1) so it w… #33

Closed torbinsky closed 7 years ago

torbinsky commented 7 years ago

This patch is to address https://github.com/adafruit/io-client-python/issues/8

I modified the API client by adding a new API version property to the Client constructor. This was done so the client could use API version 1, but in the future support other versions. It seemed like a better practice than continuing to hard-code a specific API version.

This patch simply updates the way the API path is created so that it can append the version. It does not fix other existing bugs with the client, including some seemingly new ones. Most tests pass, but some are failing likely due to other legacy breaking API changes. Addressing those problems seems to fall outside the scope of adding in support for a '/api/v1' path to the Client. Most likely an update like that would fall in the scope of moving the client to support API v2, probably dropping support for v1 entirely.

Suggestion: Create a v1 API branch/tag?

jwcooper commented 7 years ago

Merged, thanks!