Support for new Time API
This release adds Adafruit IO Python support for a new time api. This new time endpoint supports sending localized time to the Adafruit IO Python REST API client, based on the client's IP address. This release does not update the time endpoint within the MQTT client, it is only for the REST client.
The receive_time
method now returns a struct_time containing the year, month, day, hour, minute second, day of the week, day of the year, and a boolean for if it's daylight savings. #96
an updated Usage Example is located at basics/time.py
Note: The previous /time endpoint returned a plaintext response, instead of json. Since the new endpoint returns a JSON response, this PR will remove all plaintext-handling from the library used for the old /time endpoint:
To use in CPython, pip3 install adafruit-io
.
Read the docs for info on how to use it.