请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/dels/jd/order/get-official-order-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("startTime", "2020-11-01 01:00:00");
paraMap.put("endTime", "2020-11-01 02:00:00");
paraMap.put("key", "b57733a7028b09011b3d8bf5cb79f48b2da69d56d3f88df");
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkAlbumListRequest request = new DtkAlbumListRequest();
request.setAlbumType(0);
request.setPageId("1");
request.setPageSize(20);
request.setSort(0);
DtkApiResponse < DtkPageResponse < DtkAlbumListResponse >> execute = client.execute(request);
{
"requestId": "e1d08cefd75c4a13a16416d6d2be992f",
"time": 1608086099084,
"code": 0,
"msg": "成功",
"data": {
"list": [
{
"id": 47828,
"title": "近2小时热卖单品·实时更新",
"label": "实时疯抢榜,1元抢人气款",
"userName": "天猫消费券领取",
"headImg": "https://sr.ffquan.cn/bxk_mall/20200506/bqpbofkq57boprr6e05g0.jpg",
"userGoodAt": [],
"userDesc": "",
"goodsCount": 50,
"likeNum": 2,
"promoteCount": 160,
"endType": 1,
"releaseTime": "2020-05-06 21:35:50",
"uid": 1390491,
"endTime": "",
"goodsList": [
{
"pic": "https://img.alicdn.com/imgextra/i1/2204273539658/O1CN015IvYMM2LDPnmaJBzz_!!2204273539658.jpg",
"goodsid": "609167842605"
},
{
"pic": "https://img.alicdn.com/imgextra/i3/2930255252/O1CN0159ouF21ofSiQ3kPq2_!!2930255252.jpg",
"goodsid": "598088771970"
},
{
"pic": "https://img.alicdn.com/imgextra/i2/2206408066045/O1CN01lb42di1uWenKCJjfv_!!2206408066045.jpg",
"goodsid": "606881786356"
}
]
}
],
"pageId": "",
"totalNum": 6356,
"goScroll": false
}
}
{
msg: "服务器错误",
code: -1,
time: 1554365022200
}