🆕 #3895 【开放平台】增加第三方平台「修改试用小程序名称(昵称)」接口实现
This commit is contained in:
@@ -129,6 +129,11 @@ public interface WxOpenMaService extends WxMaService {
|
||||
*/
|
||||
String API_VERIFY_BETA_WEAPP = "https://api.weixin.qq.com/wxa/verifybetaweapp";
|
||||
|
||||
/**
|
||||
* 3.1 修改试用小程序名称
|
||||
*/
|
||||
String API_SET_BETA_WEAPP_NICKNAME = "https://api.weixin.qq.com/wxa/setbetaweappnickname";
|
||||
|
||||
/**
|
||||
* 4. 获取授权小程序帐号的可选类目
|
||||
*/
|
||||
@@ -518,6 +523,16 @@ public interface WxOpenMaService extends WxMaService {
|
||||
*/
|
||||
WxOpenResult verifyBetaWeapp(WxOpenMaVerifyBetaWeappMessage verifyBetaWeappMessage) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 设置小程序昵称
|
||||
*
|
||||
* @param name 小程序名称,昵称半自动设定,强制后缀“的体验小程序”。且该参数会进行关键字检查,如果命中品牌关键字则会报错。
|
||||
* 如遇到品牌大客户要用试用小程序,建议用户先换个名字,认证后再修改成品牌名
|
||||
* @return the wx open result
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxOpenResult setBetaWeappNickName(String name) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取授权小程序帐号的可选类目
|
||||
* <p>
|
||||
|
||||
@@ -274,6 +274,14 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxOpenResult setBetaWeappNickName(String name) throws WxErrorException {
|
||||
JsonObject params = new JsonObject();
|
||||
params.addProperty("name", name);
|
||||
String response = post(API_SET_BETA_WEAPP_NICKNAME, GSON.toJson(params));
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxOpenMaCategoryListResult getCategoryList() throws WxErrorException {
|
||||
String response = get(API_GET_CATEGORY, null);
|
||||
|
||||
Reference in New Issue
Block a user