@Test public void getTest() throws ApiException { List<Postage> result = postagesAPI.get(null, TAOBAO_SESSION_KEY); logger.debug("taobao.postages.get:{}", APICaller.jsonBinder.toJson(result)); }
public List<Postage> get(String fields, String sessionKey) throws ApiException { PostagesGetRequest request = new PostagesGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Postage.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } PostagesGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getPostages(); }
PostagesAPI { public List<Postage> get(String fields, String sessionKey) throws ApiException { PostagesGetRequest request = new PostagesGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Postage.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } PostagesGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getPostages(); } }
PostagesAPI { public List<Postage> get(String fields, String sessionKey) throws ApiException { PostagesGetRequest request = new PostagesGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Postage.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } PostagesGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getPostages(); }  }
PostagesAPI { public List<Postage> get(String fields, String sessionKey) throws ApiException { PostagesGetRequest request = new PostagesGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Postage.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } PostagesGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getPostages(); }  List<Postage> get(String fields, String sessionKey); }
PostagesAPI { public List<Postage> get(String fields, String sessionKey) throws ApiException { PostagesGetRequest request = new PostagesGetRequest(); if (StringUtils.isBlank(fields)) { List<String> values = DomainResolver.getApiFieldValues(Postage.class); request.setFields(Joiner.on(",").join(values)); } else { request.setFields(fields); } PostagesGetResponse response = APICaller.call(request, sessionKey); APICaller.resolveResponseException(response); return response.getPostages(); }  List<Postage> get(String fields, String sessionKey);  }