45 lines
978 B
Python
Executable File
45 lines
978 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import logging
|
|
from ddapioper import ddApiOper
|
|
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 = ddApiOper("<TODO>.crt", "<TODO>.key")
|
|
#locations(rws)
|
|
#quantities(rws)
|
|
#quantitiesHoekvanHolland(rws)
|
|
waterlevelHoekvanHolland(rws)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|