update README
This commit is contained in:
parent
10326da9b3
commit
4d9d47ef91
19
README.md
19
README.md
@ -19,6 +19,19 @@ try:
|
|||||||
# Do another task here
|
# Do another task here
|
||||||
firmware = zk.get_firmware_version()
|
firmware = zk.get_firmware_version()
|
||||||
print 'Firmware Version: : {}'.format(firmware.get('data'))
|
print 'Firmware Version: : {}'.format(firmware.get('data'))
|
||||||
|
users = zk.get_users()
|
||||||
|
if users.get('status'):
|
||||||
|
for user in users.get('data'):
|
||||||
|
privilege = 'User'
|
||||||
|
if user.privilege == const.USER_ADMIN:
|
||||||
|
privilege = 'Admin'
|
||||||
|
|
||||||
|
print '- UID #{}'.format(user.uid)
|
||||||
|
print ' Name : {}'.format(user.name)
|
||||||
|
print ' Privilege : {}'.format(privilege)
|
||||||
|
print ' Password : {}'.format(user.password)
|
||||||
|
print ' Group ID : {}'.format(user.group_id)
|
||||||
|
print ' User ID : {}'.format(user.user_id)
|
||||||
|
|
||||||
# don't forget to re-enable device
|
# don't forget to re-enable device
|
||||||
zk.enable_device()
|
zk.enable_device()
|
||||||
@ -42,6 +55,12 @@ zk.get_firmware_version()
|
|||||||
zk.set_user(uid=1, name='Fanani M. Ihsan', privilege=const.USER_ADMIN, password='12345678', group_id='', user_id='123')
|
zk.set_user(uid=1, name='Fanani M. Ihsan', privilege=const.USER_ADMIN, password='12345678', group_id='', user_id='123')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Get User
|
||||||
|
|
||||||
|
```
|
||||||
|
users = zk.get_users()
|
||||||
|
```
|
||||||
|
|
||||||
* Test voice
|
* Test voice
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user