Exemplo n.º 1
0
 public MpNews getMpNews(int agent, String mediaId) {
   String url = WxEndpoint.get("url.material.mpnews.get");
   String response = wxClient.get(String.format(url, agent, mediaId));
   GetMpNewsResponse getMpNewsResponse =
       JsonMapper.defaultMapper().fromJson(response, GetMpNewsResponse.class);
   if (getMpNewsResponse != null) {
     return getMpNewsResponse.getMpNews();
   } else {
     return null;
   }
 }
Exemplo n.º 2
0
 public Counts count(int agent) {
   String response = wxClient.get(String.format(WxEndpoint.get("url.material.count"), agent));
   return JsonMapper.defaultMapper().fromJson(response, Counts.class);
 }
Exemplo n.º 3
0
 public void delete(int agent, String mediaId) {
   String response =
       wxClient.get(String.format(WxEndpoint.get("url.material.delete"), agent, mediaId));
   logger.info("material delete result: {}", response);
 }