finish06 / pyunifi

https://unifi-sdn.ubnt.com/
MIT License
228 stars 99 forks source link

Add forget_client (using forget_sta api) #49

Open yuphing-ong opened 5 years ago

yuphing-ong commented 5 years ago

Nothing new, just cleaning up the lint errors from pull request #43 that stops it from being accepted.

finish06 commented 5 years ago

@yuphing-ong Can the block_client and unblock_client also use the new _macs_cmd function?

yuphing-ong commented 5 years ago

@yuphing-ong Can the block_client and unblock_client also use the new _macs_cmd function?

Unfortunately no. FYI _macs_cmd is just sending param 'macs':MACS, where MACS must be a list of macs (one or more). I'm not implementing any iteration, it's just what the Unifi API is expecting.

I'm using https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/src/Client.php as a reference, so block_sta and unblock_sta only take cmd param 'mac' and a single mac, whereas forget_sta takes the param 'macs': '[...]'.