download receiver details via rest api

This commit is contained in:
Jakob Ketterl
2020-05-10 17:27:46 +02:00
parent 11cf2a96e2
commit 8df885b727
4 changed files with 33 additions and 19 deletions

21
owrx/details.py Normal file
View File

@ -0,0 +1,21 @@
from owrx.config import Config
from owrx.locator import Locator
from owrx.property import PropertyFilter
class ReceiverDetails(PropertyFilter):
def __init__(self):
super().__init__(
Config.get(),
"receiver_name",
"receiver_location",
"receiver_asl",
"receiver_gps",
"photo_title",
"photo_desc",
)
def __dict__(self):
receiver_info = super().__dict__()
receiver_info["locator"] = Locator.fromCoordinates(receiver_info["receiver_gps"])
return receiver_info