Files
ddOperApi/test-ddapi
Marcel Nijenhof 4f2cc7f7c0
All checks were successful
continuous-integration/drone/push Build is passing
Correcties ddoperapi --> ddOperApi
2021-05-30 17:33:24 +02:00

45 lines
975 B
Python
Executable File

#!/usr/bin/python3
import logging
from ddOperApi import ddOperApi
from pprint import pprint
def locations(rws):
l = rws.locations()
print(type(l))
for f in l.locationNames():
print(f)
def quantities(rws):
q = rws.quantities()
print(type(q))
for f in q.quantities():
print(f)
def quantitiesHoekvanHolland(rws):
q = rws.locationQuantities("hoekvanholland")
print(type(q))
for f in q.quantities():
print(f)
def waterlevelHoekvanHolland(rws):
v = rws.values("hoekvanholland", "waterlevel")
pprint(v.source())
pprint(v.provider())
pprint(v.aspectSet())
pprint(v.location())
for i in v.values():
pprint(i)
print(v.sip())
def main():
logging.basicConfig(level=logging.DEBUG)
rws = ddOperApi("<TODO>.crt", "<TODO>.key")
locations(rws)
quantities(rws)
quantitiesHoekvanHolland(rws)
waterlevelHoekvanHolland(rws)
if __name__ == "__main__":
main()