Description

  • Description of the roller widget

Interface version

Version number Writer Date Description
1.0 Qin Zhitian June 22, 2021 initial release

IP address

http://192.168.1.1/wapi

API list

Name Description
set set attributes
get get attributes

1. set

Description of request parameters

Parameter Name Type Description
attr string attribute
attr.func string function: ro_selected-‘set the selected item’;ro_up-‘scroll up’;ro_down-‘scroll down’;
attr.selected string parameter: item id

Call example

{
    "wid": "s1",
    "cmd" : "set",
    "attr": {
        "func": "ro_selected",             
        "selected":2
    }
}
Note: set the second item in the roller to be selected;
{
    "wid": "s1",
    "cmd" : "set",
    "attr": {
        "func": "ro_up"
    }
}
Note: set the roller to scroll up;
{
    "wid": "s1",
    "cmd" : "set",
    "attr": {
        "func": "ro_down"
    }
}
Note: set the roller to scroll down;

Return example

{
    "code": 0
}

Description of return parameters

Parameter Name Type Description
result string result information
result.code int error code

Error code

Error Code Description

2. get

Description of request parameters

Parameter Name Type Description

Call example

{
    "wid": "s1",
    "cmd" : "get"
}

Return example

{
    "cnt": 3,
    "code": 0
}

Description of return parameters

Parameter Name Type Description
result string result information
result.code int error code
result.cnt int get item number

Error code

Error Code Description
文档更新时间: 2021-08-19 15:32   作者:plj