@Test public void testDownload() { InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("media/image.png"); String mediaId = Medias.defaultMedias().upload(MediaType.image, inputStream, "image.png"); Assert.assertNotNull(mediaId); File file = Medias.defaultMedias().download(mediaId); Assert.assertTrue(file.exists()); }
public File download(String mediaId) { return wxClient.download(String.format(WxEndpoint.get("url.media.get"), mediaId)); }
Medias { public File download(String mediaId) { return wxClient.download(String.format(WxEndpoint.get("url.media.get"), mediaId)); } }
Medias { public File download(String mediaId) { return wxClient.download(String.format(WxEndpoint.get("url.media.get"), mediaId)); }  }
Medias { public File download(String mediaId) { return wxClient.download(String.format(WxEndpoint.get("url.media.get"), mediaId)); }  static Medias defaultMedias(); static Medias with(CorpSetting corpSetting); void setWxClient(WxClient wxClient); String upload(MediaType type, InputStream inputStream, String fileName); File download(String mediaId); }
Medias { public File download(String mediaId) { return wxClient.download(String.format(WxEndpoint.get("url.media.get"), mediaId)); }  static Medias defaultMedias(); static Medias with(CorpSetting corpSetting); void setWxClient(WxClient wxClient); String upload(MediaType type, InputStream inputStream, String fileName); File download(String mediaId);  }