7
7
*
8
8
*/
9
9
export default {
10
- /**
11
- * 读取米家的用户配置信息 /user/get_user_config(获取/user/set_user_config写入的用户配置)
12
- * @param {number } componentId 厂商APP_ID,需要向小米申请, 0 和 1 预留
13
- * @param {...number } keys 保存的数据索引,从0开始
14
- * @returns {Promise } key,value结构数据
15
- * @example
16
- * getUserConfigs(componentId, k1,k2,k3).then(res => {...})
17
- */
18
- getUserConfigs ( componentId , ...keys ) {
19
- return Promise . resolve ( null ) ;
20
- } ,
21
- /**
22
- * 读取三方数据,该接口读取厂商的用户配置信息 /user/get_third_user_config,对应的写的接口为:set_third_user_config。
23
- * @param {string } model 设备Model
24
- * @param {...number } keys 根据key获取配置,如果不传keys 返回用户该厂商的所有配置
25
- * @deprecated 10023开始废弃,建议使用gethirdUserConfigsForOneKey, 与sethirdUserConfigsForOneKey配套使用
26
- * @example
27
- * getThirdUserConfigs(model, k1,k2,k3).then(res => {...})
28
- */
29
- getThirdUserConfigs ( model , ...keys ) {
30
- return Promise . resolve ( null ) ;
31
- } ,
32
- /**
33
- * 写数据 /user/set_user_config
34
- * @param {string } componentId 厂商APP_ID,需要向小米申请,0和1预留
35
- * @param {* } data key,value结构数据
36
- * @returns {Promise }
37
- */
38
- setUserConfigs ( componentId , data ) {
39
- return Promise . resolve ( null ) ;
40
- } ,
41
- /**
42
- * 写数据 /user/set_user_config, data的数据量不能超过2048字节
43
- * @param {string } model
44
- * @param {number } key
45
- * @param {json } data
46
- * @deprecated 10023开始废弃,建议使用setThirdUserConfigsForOneKey, data数据量支持分段保存
47
- */
48
- setThirdUserConfigs ( model , key , data ) {
49
- return Promise . resolve ( null ) ;
50
- } ,
51
- /**
52
- * 写数据 /user/set_user_config
53
- * 创建或修改设置插件自由存储空间。如果数据超过服务器设置的阈值,自动分段存储到云端。
54
- * 但是分段存储会占用额外的key,比如key=100时,分出的新段会存储在101,102,103...等后续相邻的key上,
55
- * 因此如果插件方需要存储多个key-value,建议多个key之间相差较大
56
- * @since 10023
57
- * @param {string } model
58
- * @param {number } key
59
- * @param {json } data
60
- */
61
- setThirdUserConfigsForOneKey ( model , key , data ) {
62
- return Promise . resolve ( null ) ;
63
- } ,
64
- /**
65
- * 与setThirdUserConfigsForOneKey配套使用,会把分段的数据自动合并后返回,使得分段行为对调用者透明
66
- * @since 10023
67
- * @param model
68
- * @param key
69
- * @returns {Promise<any> }
70
- */
71
- getThirdUserConfigsForOneKey ( model , key ) {
72
- return Promise . resolve ( null ) ;
73
- } ,
10
+ /**
11
+ * 读取米家的用户配置信息 /user/get_user_config(获取/user/set_user_config写入的用户配置)
12
+ * @param {number } componentId 厂商APP_ID(Cloud ID),需要向小米申请, 0 和 1 预留
13
+ * @param {...number } keys 保存的数据索引,从0开始
14
+ * @returns {Promise } key,value结构数据
15
+ * @deprecated 10023开始废弃,建议使用 getThirdUserConfigsForOneKey
16
+ * @example
17
+ * getUserConfigs(componentId, k1,k2,k3).then(res => {...})
18
+ */
19
+ getUserConfigs ( componentId , ...keys ) {
20
+ return Promise . resolve ( null ) ;
21
+ } ,
22
+ /**
23
+ * 读取三方数据,该接口读取厂商的用户配置信息 /user/get_third_user_config,对应的写的接口为:set_third_user_config。
24
+ * @param {string } model 设备Model
25
+ * @param {...number } keys 根据key获取配置,如果不传keys 返回用户该厂商的所有配置
26
+ * @deprecated 10023开始废弃,建议使用getThirdUserConfigsForOneKey, 与setThirdUserConfigsForOneKey配套使用
27
+ * @example
28
+ * getThirdUserConfigs(model, k1,k2,k3).then(res => {...})
29
+ */
30
+ getThirdUserConfigs ( model , ...keys ) {
31
+ return Promise . resolve ( null ) ;
32
+ } ,
33
+ /**
34
+ * 写数据 /user/set_user_config
35
+ * @param {string } componentId 厂商APP_ID(Cloud ID),需要向小米申请,0和1预留
36
+ * @param {* } data key,value结构数据
37
+ * @returns {Promise }
38
+ * @deprecated 10023开始废弃,建议使用 setThirdUserConfigsForOneKey, data数据量支持分段保存
39
+ */
40
+ setUserConfigs ( componentId , data ) {
41
+ return Promise . resolve ( null ) ;
42
+ } ,
43
+ /**
44
+ * 写数据 /user/set_user_config, data的数据量不能超过2048字节
45
+ * @param {string } model
46
+ * @param {number } key
47
+ * @param {json } data
48
+ * @deprecated 10023开始废弃,建议使用setThirdUserConfigsForOneKey, data数据量支持分段保存
49
+ */
50
+ setThirdUserConfigs ( model , key , data ) {
51
+ return Promise . resolve ( null ) ;
52
+ } ,
53
+ /**
54
+ * 写数据 /user/set_user_config
55
+ * 创建或修改设置插件自由存储空间。如果数据超过服务器设置的阈值,自动分段存储到云端。
56
+ * 但是分段存储会占用额外的key,比如key=100时,分出的新段会存储在101,102,103...等后续相邻的key上,
57
+ * 因此如果插件方需要存储多个key-value,建议多个key之间相差较大
58
+ * @since 10023
59
+ * @param {string } model
60
+ * @param {number } key
61
+ * @param {json } data
62
+ */
63
+ setThirdUserConfigsForOneKey ( model , key , data ) {
64
+ return Promise . resolve ( null ) ;
65
+ } ,
66
+ /**
67
+ * 与setThirdUserConfigsForOneKey配套使用,会把分段的数据自动合并后返回,使得分段行为对调用者透明
68
+ * @since 10023
69
+ * @param model
70
+ * @param key
71
+ * @returns {Promise<any> }
72
+ */
73
+ getThirdUserConfigsForOneKey ( model , key ) {
74
+ return Promise . resolve ( null ) ;
75
+ } ,
74
76
}
0 commit comments