WEEE-Open / pytarallo

Python T.A.R.A.L.L.O. API
MIT License
2 stars 4 forks source link

Implement Tarallo.update_features #32

Closed lvps closed 5 years ago

lvps commented 6 years ago

Here's an example:

session.patch(f"http://127.0.0.1:8080/v1/items/{code}/features", headers={"Content-Type": "application/json"}, data=json.dumps({'psu-rails-most-power': '5v'}))

The data is a dictionary of feature names mapped to values (or None if you want to delete that feature). The "difficult" part will be to obtain this "delta" of changes from an Item.

lvps commented 5 years ago

Done in https://github.com/WEEE-Open/python-tarallo/commit/08356dce64f8c7595e8bf12cc58e20f8b74dd3a0 and previous commits