@Test public void list_get() throws ValidationException, ApiException { List<Item> result = ItemsAPI.list_get(null, "12351649353,12475120363", TAOBAO_SESSION_KEY); logger.debug("taobao.items.list.get:{}", APICaller.jsonBinder.toJson(result)); }
public static List<Item> list_get(String fields, String num_iids, String sessionKey) throws ValidationException, ApiException { ItemsListGetRequest request = new ItemsListGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Item.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } String[] split = StringUtils.split(num_iids, ","); if (split.length > 20) { throw new ValidationException("卖家店铺内自定义类目ID最多为20个"); } request.setNumIids(num_iids); ItemsListGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getItems(); }
ItemsAPI { public static List<Item> list_get(String fields, String num_iids, String sessionKey) throws ValidationException, ApiException { ItemsListGetRequest request = new ItemsListGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Item.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } String[] split = StringUtils.split(num_iids, ","); if (split.length > 20) { throw new ValidationException("卖家店铺内自定义类目ID最多为20个"); } request.setNumIids(num_iids); ItemsListGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getItems(); } }
ItemsAPI { public static List<Item> list_get(String fields, String num_iids, String sessionKey) throws ValidationException, ApiException { ItemsListGetRequest request = new ItemsListGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Item.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } String[] split = StringUtils.split(num_iids, ","); if (split.length > 20) { throw new ValidationException("卖家店铺内自定义类目ID最多为20个"); } request.setNumIids(num_iids); ItemsListGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getItems(); }  }
ItemsAPI { public static List<Item> list_get(String fields, String num_iids, String sessionKey) throws ValidationException, ApiException { ItemsListGetRequest request = new ItemsListGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Item.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } String[] split = StringUtils.split(num_iids, ","); if (split.length > 20) { throw new ValidationException("卖家店铺内自定义类目ID最多为20个"); } request.setNumIids(num_iids); ItemsListGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getItems(); }  static Map<String, Object> onsale_get(ItemsOnsaleGetRequest request, String sessionKey); static List<Item> list_get(String fields, String num_iids, String sessionKey); }
ItemsAPI { public static List<Item> list_get(String fields, String num_iids, String sessionKey) throws ValidationException, ApiException { ItemsListGetRequest request = new ItemsListGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Item.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } String[] split = StringUtils.split(num_iids, ","); if (split.length > 20) { throw new ValidationException("卖家店铺内自定义类目ID最多为20个"); } request.setNumIids(num_iids); ItemsListGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getItems(); }  static Map<String, Object> onsale_get(ItemsOnsaleGetRequest request, String sessionKey); static List<Item> list_get(String fields, String num_iids, String sessionKey);  }