Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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. 获取授权小程序帐号的可选类目
*/
Expand Down Expand Up @@ -518,6 +523,16 @@ WxOpenMaDomainResult modifyDomainDirectly(String action, List<String> requestDom
*/
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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ public WxOpenResult verifyBetaWeapp(WxOpenMaVerifyBetaWeappMessage verifyBetaWea
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);
Expand Down