joopert / nad_receiver

python api to connect to NAD receivers
MIT License
12 stars 18 forks source link

Dynamic api #29

Open gladhorn opened 4 years ago

gladhorn commented 4 years ago

This is a bit of an exercise to play with Python attributes. See description in the commit message of https://github.com/joopert/nad_receiver/commit/4c73c4670514440b4bda3bcdf376717a89343140

Basically new API can be added by just editing CMDS in nad_commands.py. receiver.main.volume.increase() works then by inspecting the commands dictionary.

gladhorn commented 4 years ago

@nierob might find this amusing