src/wiotp/sdk/api/lec/__init__.py
def getAll(self, deviceUid):
        """
        Retrieves a list of the last cached message for all events 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" % (deviceUid.typeId, deviceUid.deviceId)
        r = self._apiClient.get(url)

        if r.status_code == 200:
            events = []
            for event in r.json():
                events.append(LastEvent(**event))
            return events
        else:
            raise ApiException(r)
def getAll(self, deviceUid):
        """
        Retrieves a list of the last cached message for all events 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" % (deviceUid.typeId, deviceUid.deviceId)
        r = self._apiClient.get(url)

        if r.status_code == 200:
            events = []
            for event in r.json():
                events.append(LastEvent(**event))
            return events
        else:
            raise ApiException(r)
Retrieves a list of the last cached message for all events from a specific device.