mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #2588 【小程序】代码管理增加查询小程序版本信息的接口
This commit is contained in:
@@ -105,6 +105,14 @@ public interface WxMaCodeService {
|
||||
*/
|
||||
WxMaCodeVersionDistribution getSupportVersion() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 查询小程序版本信息
|
||||
*
|
||||
* @return 小程序的体验版和线上版本信息
|
||||
* @throws WxErrorException 失败时抛出,具体错误码请看此接口的注释文档
|
||||
*/
|
||||
WxMaCodeVersionInfo getVersionInfo() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 设置最低基础库版本(仅供第三方代小程序调用).
|
||||
*
|
||||
|
||||
@@ -138,6 +138,12 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
|
||||
return WxMaCodeVersionDistribution.fromJson(responseContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMaCodeVersionInfo getVersionInfo() throws WxErrorException {
|
||||
String responseContent = this.service.post(GET_VERSION_INFO_URL, "{}");
|
||||
return WxMaCodeVersionInfo.fromJson(responseContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSupportVersion(String version) throws WxErrorException {
|
||||
JsonObject param = new JsonObject();
|
||||
|
||||
Reference in New Issue
Block a user