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._base = joinpath(self.url, API_BASE)
|
||||||
self.key = key
|
self.key = key
|
||||||
self._dials = []
|
self._dials = []
|
||||||
|
self.refresh()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@property
|
def refresh(self):
|
||||||
def dials(self):
|
|
||||||
dial_data = self._req("list")
|
dial_data = self._req("list")
|
||||||
for d in dial_data:
|
for d in dial_data:
|
||||||
dial = Dial(self, d["uid"])
|
dial = Dial(self, d["uid"])
|
||||||
if not dial in self._dials:
|
if not dial in self._dials:
|
||||||
self._dials.append(dial)
|
self._dials.append(dial)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dials(self):
|
||||||
return self._dials
|
return self._dials
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue