sq6jnx / sr0wx.py

Automatic hamradio weather station written in python
Apache License 2.0
13 stars 4 forks source link

Add module for burze.dzis.net #34

Open wprzyb opened 9 years ago

wprzyb commented 9 years ago

I asked for a key for burze.dzis.net SOAP api allowing to get informations about lightning strikes and weather dangers in Europe.

>>> place = client.service.miejscowosc('sofia',klucz)
>>> place
(MyComplexTypeMiejscowosc){
   y = 42.41
   x = 23.19
 }

>>> print(client.service.szukaj_burzy(place.y, place.x, 100, klucz))
(MyComplexTypeBurza){
   liczba = 5
   odleglosc = 79.07
   kierunek = "E"
   okres = 15
 }
>>> print(client.service.ostrzezenia_pogodowe(place.y, place.x, klucz))
(MyComplexTypeOstrzezenia){
   od_dnia = None
   do_dnia = None
   mroz = 0
   upal = 0
   wiatr = 0
   opad = 0
   burza = 0
   traba = 0
 }
>>> 

And i am going to write a module to use it. I had an idea to make it more interactive, and ask for the data separately and issue an storm station broadcast when the storm is coming, not when the cron says so. But for now it will be another module i want to write to look how it's like to write a module for that and get some experience to grasp other modules waiting for rewrite.

sq6jnx commented 9 years ago

Please add link to API docs and terms and conditions of use.

wprzyb commented 9 years ago

W aplikacji należy zawrzeć wyraźnie informację o źródle, skąd pobierane są dane. Aplikacja musi być udostępniana za darmo, nie wolno pobierać za jej użytkowanie opłat. W aplikacji mogą być umieszczone reklamy. https://burze.dzis.net/?page=api_interfejs

Docs... there is only WSDL: https://burze.dzis.net/soap.php?WSDL

>>> print(client)

Suds ( https://fedorahosted.org/suds/ )  version: 0.6

Service ( serwerSOAPService ) tns="http://burze.dzis.net/soap.php"
   Prefixes (1)
      ns0 = "http://burze.dzis.net/soap.php"
   Ports (1):
      (serwerSOAPPort)
         Methods (4):
            KeyAPI(xs:string klucz)
            miejscowosc(xs:string nazwa, xs:string klucz)
            ostrzezenia_pogodowe(xs:float y, xs:float x, xs:string klucz)
            szukaj_burzy(xs:float y, xs:float x, xs:int promien, xs:string klucz)
         Types (3):
            MyComplexTypeBurza
            MyComplexTypeMiejscowosc
            MyComplexTypeOstrzezenia