本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/detail";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("itemid", "635557968930");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}
本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/comment";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("itemId", "579794586729");
params.put("page", "1");
params.put("sort", "10");
params.put("orderType", "参数4");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}
本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/shop/info";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("shopUrl", "https://xiyunanzhuang.tmall.com/");
params.put("forId", "false");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}
本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/app/search";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("keyword", "衣服");
params.put("page", "1");
params.put("order", "default");
params.put("startPrice", "10");
params.put("endPrice", "30");
params.put("category", "50008164");
params.put("ppath", "20000:719106774");
params.put("service", "mall");
params.put("loc", "厦门");
params.put("tab", "all");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else
本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/app/shop";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("keyword", "手机");
params.put("page", "1");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}
本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/app/tmall";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("keyword", "衣服");
params.put("tab", "newmall");
params.put("page", "1");
params.put("order", "参数4");
params.put("startPrice", "参数5");
params.put("endPrice", "参数6");
params.put("channel", "default");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}
本代码示例是基于Java的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/taobao/ 申请API服务
以下是完整代码示例:
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/taobao/app/same";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("pid", "-1068360842");
params.put("itemId", "544116301715");
params.put("page", "1");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}