请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/material/list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("id", 155547741);
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkCommodityMaterialsRequest request = new DtkCommodityMaterialsRequest();
request.setVersion("v1.0.0");
request.setId("1");
DtkApiResponse<List<DtkCommodityMaterialsResponse>> execute = client.execute(request);
{
"requestId": "1fa87c71f0c54b9884c185bfa6d9dd4f",
"time": 1616143144785,
"code": 0,
"msg": "成功",
"data": [
{
"headImg": "",
"name": "",
"newest": 0,
"hot": 0,
"createTime": "",
"materialType": 3,
"materialList": [
{
"type": 2,
"content": "http://sr.ffquan.cn/dtk_material/20201119/imagick/buqss94q2bur5291hki0.jpg"
}
]
}
]
}