pimoroni / mote

Mote - drivers for the plug and play USB APA102 controller
https://shop.pimoroni.com/products/mote
MIT License
24 stars 14 forks source link

Provide an endpoint to allow clients to determine API version on this host #14

Closed raruston closed 7 years ago

raruston commented 7 years ago

Per my forum post here: http://forums.pimoroni.com/t/mote-api-py-example-api-versioning/3601/1

It would be useful if the mote-api provided a way for clients to determine the API version running on that host, since the a client might connect to multiple host systems, each of which could be running a different version of the API.

In my specific use case, I want the Controller for Mote app to be able to support multiple Motes, each of which is on a different host system (and thus potentially different API level) without having to resort to working backwards through API versions to find out which version a particular host is at.

A simple solution would be to provide a new endpoint at: /mote/api which could return something like: {mote-api-version: "v1.0"}

raruston commented 7 years ago

Updated Mote code via full install after PR #15 merged, and tested new endpoint using Postman. Looks good so closing. Thanks :)