请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/category/get-top100";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.1");
paraMap.put("appKey", appKey);
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkGetTop100Request request = new DtkGetTop100Request();
request.setType(1);
DtkApiResponse < DtkGetTop100Response > execute = client.execute(request);
{
"status": 200,
"data": {
"time": 1589009505575,
"code": 0,
"msg": "成功",
"data": {
"hotWords": ["螺蛳粉", "口罩", "面膜", "耳机", "柳江人家","洗脸巾", "电子秤"]
}
},
"msg": "请求成功"
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}