Add refresh method

This commit is contained in:
sqozz 2024-07-04 23:34:33 +02:00
parent 16ee0c9063
commit 4de660f612

7
vu1.py
View file

@ -11,15 +11,18 @@ class DialServer():
self._base = joinpath(self.url, API_BASE)
self.key = key
self._dials = []
self.refresh()
pass
@property
def dials(self):
def refresh(self):
dial_data = self._req("list")
for d in dial_data:
dial = Dial(self, d["uid"])
if not dial in self._dials:
self._dials.append(dial)
@property
def dials(self):
return self._dials
@property