public class JwMediaAPI extends Object
| 构造器和说明 |
|---|
JwMediaAPI() |
| 限定符和类型 | 方法和说明 |
|---|---|
static WxMediaForMaterialResponse |
addMediaFileByMaterialNews(String accesstoken,
String type,
String filePath,
String fileName)
新增其他永久素材
|
static void |
deleteArticlesByMaterial(String accesstoken,
String mediaId)
删除永久素材 (经测试,该方法调用接口地址不对)
|
static void |
deleteArticlesByMaterialNews(String accesstoken,
String mediaId)
删除永久素材
|
static WxDwonload |
downMedia(String accessToke,
String media_id,
String filePath)
下载多媒体
|
static WxArticlesRespponseByMaterial |
getArticlesByMaterial(String accesstoken,
String mediaId)
获取永久素材 (经测试,该方法调用接口返回时封装实体对象不可用)
|
static List<WxNewsArticle> |
getArticlesByMaterialNews(String accesstoken,
String mediaId)
获取永久素材
|
static WxCountResponse |
getMediaCount(String accesstoken)
获取素材总数
|
static String |
getMediaIdByMaterial(String accesstoken,
List<WxArticle> wxArticles)
新增永久图文素材 (经测试,该方法不可用)
|
static String |
getMediaIdForMaterial(String accesstoken,
WxMediaForMaterial wxMediaForMaterial)
永久获取多媒体资源的mediaId
|
static void |
main(String[] args) |
static WxNews |
queryArticlesByMaterial(String accesstoken,
String type,
int offset,
int count)
获取素材列表 (经测试,该方法调用接口后json数据转java对象报错)
|
static WxNews |
queryArticlesByMaterialNews(String accesstoken,
String type,
int offset,
int count)
获取素材列表
|
static void |
updateArticlesByMaterial(String accesstoken,
WxUpdateArticle wxUpdateArticle)
修改永久素材
|
static void |
updateArticlesByMaterialNews(String accesstoken,
WxUpdateArticle wxUpdateArticle)
修改永久素材
|
static WxArticlesResponse |
uploadArticlesByMaterial(String accesstoken,
List<WxArticle> wxArticles)
上传新增永久图文素材 (经测试,该方法不可用)
|
static WxArticlesResponse |
uploadArticlesByMaterialNews(String accesstoken,
List<WxArticle> wxArticles)
上传新增永久图文素材
|
static WxUpload |
uploadMedia(String accessToke,
String type,
String fileNamePath) |
static WxMediaForMaterialResponse |
uploadMediaFileByMaterial(String accesstoken,
WxMediaForMaterial wx)
新增其他类型永久素材 (经测试,该方法不能上传永久图片素材)
|
public static WxUpload uploadMedia(String accessToke, String type, String fileNamePath) throws WexinReqException
accessToke - type - 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)fileNamePath - 上传的文件目录WexinReqExceptionpublic static WxDwonload downMedia(String accessToke, String media_id, String filePath) throws WexinReqException
accessToke - media_id - filePath - WexinReqExceptionpublic static void main(String[] args)
public static WxArticlesResponse uploadArticlesByMaterial(String accesstoken, List<WxArticle> wxArticles) throws WexinReqException
accesstoken - wxArticles - 图文集合,数量不大于10WexinReqExceptionpublic static WxCountResponse getMediaCount(String accesstoken) throws WexinReqException
accesstoken - accesstoken - WexinReqExceptionpublic static WxArticlesRespponseByMaterial getArticlesByMaterial(String accesstoken, String mediaId) throws WexinReqException
accesstoken - wxArticles - 图文集合,数量不大于10WexinReqExceptionpublic static void deleteArticlesByMaterial(String accesstoken, String mediaId) throws WexinReqException
accesstoken - mediaId - 图文集合,数量不大于10WexinReqExceptionpublic static void updateArticlesByMaterial(String accesstoken, WxUpdateArticle wxUpdateArticle) throws WexinReqException
accesstoken - wxUpdateArticle - WexinReqExceptionpublic static WxNews queryArticlesByMaterial(String accesstoken, String type, int offset, int count) throws WexinReqException
accesstoken,type,offset,count - WxNews - WexinReqExceptionpublic static String getMediaIdByMaterial(String accesstoken, List<WxArticle> wxArticles) throws WexinReqException
accesstoken - wxArticles - WexinReqExceptionpublic static WxMediaForMaterialResponse uploadMediaFileByMaterial(String accesstoken, WxMediaForMaterial wx) throws WexinReqException
filePath - fileName - type - 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)ExceptionWexinReqExceptionpublic static String getMediaIdForMaterial(String accesstoken, WxMediaForMaterial wxMediaForMaterial) throws WexinReqException
accesstoken - wxMedia - WexinReqExceptionpublic static WxMediaForMaterialResponse addMediaFileByMaterialNews(String accesstoken, String type, String filePath, String fileName) throws WexinReqException
accesstoken - wx - WexinReqExceptionpublic static WxArticlesResponse uploadArticlesByMaterialNews(String accesstoken, List<WxArticle> wxArticles) throws WexinReqException
accesstoken - wxArticles - 图文集合,数量不大于10WexinReqExceptionpublic static void updateArticlesByMaterialNews(String accesstoken, WxUpdateArticle wxUpdateArticle) throws WexinReqException
accesstoken - wxUpdateArticle - WexinReqExceptionpublic static List<WxNewsArticle> getArticlesByMaterialNews(String accesstoken, String mediaId) throws WexinReqException
accesstoken - wxArticles - 图文集合,数量不大于10WexinReqExceptionpublic static WxNews queryArticlesByMaterialNews(String accesstoken, String type, int offset, int count) throws WexinReqException
accesstoken,type,offset,count - WxNews - WexinReqExceptionpublic static void deleteArticlesByMaterialNews(String accesstoken, String mediaId) throws WexinReqException
accesstoken - mediaId - 图文集合,数量不大于10WexinReqExceptionCopyright © 2022. All rights reserved.