请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/subdivision/get-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("cid", 12);
paraMap.put("pageId", 1);
paraMap.put("pageSize", 50);
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkSubdivisionCategoryListRequest request = new DtkSubdivisionCategoryListRequest();
request.setCid(1);
request.setPageId("1");
request.setPageSize(20);
DtkApiResponse < DtkPageResponse < DtkSubdivisionCategoryListResponse >> execute = client.execute(request);
{
"requestId": "b1431ddedeb94b2e9e11e6e310a43e13",
"time": 1613791005623,
"code": 0,
"msg": "成功",
"data": {
"list": [
{
"id": 10,
"name": "驱蚊除虫"
},
{
"id": 11,
"name": "厨房用品"
},
{
"id": 12,
"name": "整理收纳"
},
{
"id": 13,
"name": "厨卫清洁"
},
{
"id": 14,
"name": "居家拖鞋"
},
{
"id": 15,
"name": "女性护理"
},
{
"id": 16,
"name": "宠物生活"
},
{
"id": 17,
"name": "绿植园艺"
},
{
"id": 19,
"name": "粮油副食"
},
{
"id": 20,
"name": "饼干糕点"
}
],
"totalNum": 497,
"pageId": "1"
}
}