76 Star 473 Fork 191

hm-tools / hm-tools-wxmp-adapter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
readme.md 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
JHybo 提交于 2020-06-07 00:22 . maven center

Maven Central

前言

本组件对应实现微信公众平台“素材管理”章节相关api接口,原接口文档地址:素材管理

接口说明

  • top.hmtools.wxmp.material.apis.ITemporaryApi 对应临时素材相关接口
  • top.hmtools.wxmp.material.apis.IForeverApi 对应永久素材相关接口

事件消息类说明

使用示例

  1. 引用jar包
<dependency>
  <groupId>top.hmtools</groupId>
  <artifactId>wxmp-material</artifactId>
  <version>1.0.0</version>
</dependency>
  1. 获取wxmpSession,参照 wxmp-core/readme.md
//2 获取动态代理对象实例
ITemporaryApi temporaryApi = this.wxmpSession.getMapper(ITemporaryApi.class);

//3 获取自定义菜单数据并打印
File file = new File("E:\\tmp\\aaaa.png");
if(!file.exists()){
	System.out.println(file+"文件不存在");
	return;
}

UploadParam uploadParam = new UploadParam();
uploadParam.setMedia(file);
uploadParam.setType(MediaType.image);
MediaBean mediaBean = this.temporaryApi.uploadMedia(uploadParam);

更多示例参见:

2020.06.02 素材组件全部测试OK

Java
1
https://gitee.com/hm-tools/hm-tools-wxmp-adapter.git
git@gitee.com:hm-tools/hm-tools-wxmp-adapter.git
hm-tools
hm-tools-wxmp-adapter
hm-tools-wxmp-adapter
master

搜索帮助