|
|
@ -137,7 +137,7 @@ class APIObject(object):
|
|
|
|
self._api = api
|
|
|
|
self._api = api
|
|
|
|
self.id = id
|
|
|
|
self.id = id
|
|
|
|
if data:
|
|
|
|
if data:
|
|
|
|
self.id = int( data.get("id", None) )
|
|
|
|
self.id = int(data.get("id", None))
|
|
|
|
self._data = data
|
|
|
|
self._data = data
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@classmethod
|
|
|
@ -147,7 +147,10 @@ class APIObject(object):
|
|
|
|
@property
|
|
|
|
@property
|
|
|
|
def data(self):
|
|
|
|
def data(self):
|
|
|
|
if self._data is None:
|
|
|
|
if self._data is None:
|
|
|
|
self._data = self._api.get(self.makeUrl())
|
|
|
|
if self.id:
|
|
|
|
|
|
|
|
self._data = self._api.get(self.makeUrl(id=self.id))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self._data = self._api.get(self.makeUrl())
|
|
|
|
return self._data
|
|
|
|
return self._data
|
|
|
|
|
|
|
|
|
|
|
|
@data.setter
|
|
|
|
@data.setter
|
|
|
|