Тема: Listing existing geofences using the Wialon Python API
Hi,
I am new to the Wialon API and therefore the problem I have is a relatively simple one. I am currently trying to use the Python Wialon module to get a list of existing geofences and their details. Attached below is the code I used:
from wialon.api import Wialon, WialonError
from wialon import flags
try:
wialon_api = Wialon()
result = wialon_api.token_login(token='MYKEY')
wialon_api.sid = result['eid']
result = wialon_api.avl_evts()
spec = {
'itemId': '4096',
'col': '[]',
}
try:
geofences = wialon_api.resource_get_zone_data(spec=spec)
print(geofences)
except WialonError as e:
print(e)
wialon_api.core_logout()
except WialonError as e:
pass
However, this resulted in the following error:
WialonError(Invalid input resource_get_zone_data (4))
What might I be doing wrong?
Thank you in advance.