日期:2014-05-19 浏览次数:20797 次
private static String serverUrl="http://gw.api.360buy.com/routerjson";//正式环境的接口,
private static String appKey="";//用户值
private static String appSecret="";//用户密钥
private static String accessToken="";//用户令牌,周期为360天
public CategorySearchResponse category() throws JdException{
client =new DefaultJdClient(serverUrl, accessToken, appKey, appSecret);
//WareAddRequest wareAddRequest = new WareAddRequest();
CategorySearchRequest request = new CategorySearchRequest();
//id(类目id),fid(父类目id),status(类目状态(deleted,unvalid, valid)),lev(等级(类目分为1、2、3级)),name(类目名称),index_id(排序(越小越靠前))
//request.setFields("1,");
CategorySearchResponse response=client.execute(request);
return response;
}