淘宝客【公用】淘口令生成,淘宝客【推广者】聚划算商品获取,淘宝客【推广者】物料精选,淘宝客【推广者】官方活动转链,淘宝客【推广者】物料搜索,淘宝客【公用】物料信息查询;测试接口对接
//淘口令转换
public String tbk(String tkUrl,TaobaoClient client) throws ApiException {
TbkTpwdCreateRequest req = new TbkTpwdCreateRequest();
req.setText("长度大于5个字符");
req.setUrl("https:"+tkUrl);
/*req.setLogo("https://uland.taobao.com/");*/
TbkTpwdCreateResponse rsp = client.execute(req);
System.out.println("淘口令对象:"+rsp.getBody());
String rspBody = rsp.getBody();
Gson gson = new Gson();
TbkTpwdCreate tbkTpwdCreate = gson.fromJson(rspBody, TbkTpwdCreate.class);
String model = tbkTpwdCreate.getTbkTpwdCreate().getTbkData().getModel();
return model;
}
全部测试接口,可点击下载。
用于开放者学习,里面有详细代码说明