finish06 / pyunifi

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

Adding of support for vouchers #42

Closed BlackSmith closed 4 years ago

finish06 commented 4 years ago

@BlackSmith Thank you for the pull request! Life is busy at the moment with school starting, however I will attempt to merge in the coming 7 days.

BlackSmith commented 4 years ago

You are welcome. :) Can I ask you, I want to use unifi vouchers on my external authentication portal. I found out that the Unifi controller API does not support guest authentication via voucher. I can get all vouchers and check it in my script, after that I can use authorize_guest and enable of guest. Unfortunately in this case, the voucher is still unused and expiration time does not start counting. Voucher never expire. :(

Do you have any idea how to solve this problem? Thank you in advance.

finish06 commented 4 years ago

Could you script run the delete_voucher method after a period of time?

finish06 commented 4 years ago

Further, the README contribution is great! I definitely think a solid API library needs good documentation so thank you. I do not use voucher functionality in my build, nor know much about it. Therefore, I am going to have faith the functionality works as the code looks good.