src/wiotp/sdk/api/lec/__init__.py
def get(self, deviceUid, eventId):
        """
        Retrieves the last cached message for specified event from a specific device.
        """

        if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
            deviceUid = DeviceUid(**deviceUid)

        url = "api/v0002/device/types/%s/devices/%s/events/%s" % (deviceUid.typeId, deviceUid.deviceId, eventId)
        r = self._apiClient.get(url)

        if r.status_code == 200:
            return LastEvent(**r.json())
        else:
            raise ApiException(r)
def get(self, deviceUid, eventId):
        if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
            deviceUid = DeviceUid(**deviceUid)

        url = "api/v0002/device/types/%s/devices/%s/events/%s" % (deviceUid.typeId, deviceUid.deviceId, eventId)
        r = self._apiClient.get(url)

        if r.status_code == 200:
            return LastEvent(**r.json())
        else:
            raise ApiException(r)
def get ( self , deviceUid , eventId ) : if not isinstance ( deviceUid , DeviceUid ) and isinstance ( deviceUid , dict ) : deviceUid = DeviceUid ( * * deviceUid ) url = "api/v0002/device/types/%s/devices/%s/events/%s" % ( deviceUid . typeId , deviceUid . deviceId , eventId ) r = self . _apiClient . get ( url ) if r . status_code == 200 : return LastEvent ( * * r . json ( ) ) else : raise ApiException ( r )
Retrieves the last cached message for specified event from a specific device.
Retrieves the last cached message for specified event from a specific device .