Add refresh method
This commit is contained in:
parent
16ee0c9063
commit
4de660f612
7
vu1.py
7
vu1.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue