mirror of
https://github.com/yawaflua/Py-SPW.git
synced 2025-12-10 12:29:30 +02:00
Upload 1.5.0 version
Upload docs
This commit is contained in:
14
examples/check_access.py
Normal file
14
examples/check_access.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pyspw
|
||||
|
||||
|
||||
# Init library
|
||||
api = pyspw.SpApi(card_id='card_id',
|
||||
card_token='card_token')
|
||||
|
||||
# Check access to server
|
||||
print(api.check_access('287598524017803264')) # True
|
||||
print(api.check_access('289341856083607552')) # False
|
||||
|
||||
|
||||
# Check more than one access
|
||||
print(api.check_accesses(['403987036219899908', '558667431187447809'], delay=1)) # False, True
|
||||
Reference in New Issue
Block a user