Package 

Interface IThingSmartRequest

    • Method Summary

      Modifier and Type Method Description
      abstract void requestWithApiName(String apiName, String version, Map<String, Object> postData, IRequestCallback request) Deprecated.
      abstract <T> void requestWithApiName(String apiName, String version, Map<String, Object> postData, Class<T> object, IThingDataCallback<T> callback) Applicable to api interface request with session.
      abstract <T> void requestWithApiNameWithoutSession(String apiName, String version, Map<String, Object> postData, Class<T> object, IThingDataCallback<T> callback) Applies to api interface requests without session.
      abstract void requestWithApiNameWithoutSession(String apiName, String version, Map<String, Object> postData, IRequestCallback request) Deprecated.
      abstract void queryDeviceOperateLogs(String devId, String dpIds, int offset, int limit, String startTime, String endTime, String sortType, IThingDataCallback<String> callback) Query the device operate log
      abstract void sendCacheDps(String devId, String dps, long validity, int dpCacheType, IThingDataCallback<Boolean> listener)
      abstract void onDestroy() Cancel all request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • requestWithApiName

         abstract <T> void requestWithApiName(String apiName, String version, Map<String, Object> postData, Class<T> object, IThingDataCallback<T> callback)

        Applicable to api interface request with session.

        To call this method, the user needs to log in first.

        Parameters:
        apiName - api name
        version - api version
        postData - Post sent data
        object - The Class for json serialization.
        callback - Callback request result.
      • requestWithApiNameWithoutSession

         abstract <T> void requestWithApiNameWithoutSession(String apiName, String version, Map<String, Object> postData, Class<T> object, IThingDataCallback<T> callback)

        Applies to api interface requests without session.

        Parameters:
        apiName - api name
        version - api version
        postData - Post sent data
        object - The Class for json serialization.
        callback - Callback request result.
      • queryDeviceOperateLogs

         abstract void queryDeviceOperateLogs(String devId, String dpIds, int offset, int limit, String startTime, String endTime, String sortType, IThingDataCallback<String> callback)

        Query the device operate log

        Parameters:
        devId - device id
        dpIds - The DPs to be returned, separated with commas (,).
        offset - The number of entries starting from which entries are returned.
        limit - The number of entries to be returned per page.
        startTime - The time when DP status reporting starts.
        endTime - The time when DP status reporting ends.
        sortType - The method to sort data by time.
      • onDestroy

         abstract void onDestroy()

        Cancel all request.