1
0
mirror of synced 2025-12-23 18:48:00 +08:00

添加多媒体文件下载支持

This commit is contained in:
Daniel Qian
2014-08-24 14:18:31 +08:00
parent 7a2f7a8a4b
commit 71215bbe79
25 changed files with 386 additions and 117 deletions

View File

@@ -44,6 +44,7 @@ public interface WxService {
/**
* <pre>
* 上传多媒体文件
*
* 上传的多媒体文件有格式和大小限制,如下:
* 图片image: 1M支持JPG格式
* 语音voice2M播放长度不超过60s支持AMR\MP3格式
@@ -67,6 +68,18 @@ public interface WxService {
*/
public WxUploadResult uploadMedia(String mediaType, File file) throws WxErrorException;
/**
* <pre>
* 下载多媒体文件
*
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=上传下载多媒体文件
* </pre>
* @params media_id
* @return 保存到本地的临时文件
* @throws WxErrorException
*/
public File downloadMedia(String media_id) throws WxErrorException;
/**
* <pre>
* 发送客服消息
@@ -75,7 +88,7 @@ public interface WxService {
* @param message
* @throws WxErrorException
*/
public String sendCustomMessage(WxCustomMessage message) throws WxErrorException;
public void sendCustomMessage(WxCustomMessage message) throws WxErrorException;
/**
* <pre>
@@ -85,7 +98,7 @@ public interface WxService {
* @param menu
* @throws WxErrorException
*/
public String createMenu(WxMenu menu) throws WxErrorException;
public void createMenu(WxMenu menu) throws WxErrorException;
/**
* <pre>
@@ -94,7 +107,7 @@ public interface WxService {
* </pre>
* @throws WxErrorException
*/
public String deleteMenu() throws WxErrorException;
public void deleteMenu() throws WxErrorException;
/**
* <pre>