use of me.chanjar.weixin.common.util.http.SimplePostRequestExecutor in project weixin-java-tools by chanjarster.
the class WxMpServiceImpl method userUpdateRemark.
public void userUpdateRemark(String openid, String remark) throws WxErrorException {
String url = "https://api.weixin.qq.com/cgi-bin/user/info/updateremark";
JsonObject json = new JsonObject();
json.addProperty("openid", openid);
json.addProperty("remark", remark);
execute(new SimplePostRequestExecutor(), url, json.toString());
}
use of me.chanjar.weixin.common.util.http.SimplePostRequestExecutor in project weixin-java-tools by chanjarster.
the class WxMpServiceImpl method massGroupMessageSend.
public WxMpMassSendResult massGroupMessageSend(WxMpMassGroupMessage message) throws WxErrorException {
String url = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall";
String responseContent = execute(new SimplePostRequestExecutor(), url, message.toJson());
return WxMpMassSendResult.fromJson(responseContent);
}
use of me.chanjar.weixin.common.util.http.SimplePostRequestExecutor in project weixin-java-tools by chanjarster.
the class WxMpServiceImpl method userUpdateGroup.
public void userUpdateGroup(String openid, long to_groupid) throws WxErrorException {
String url = "https://api.weixin.qq.com/cgi-bin/groups/members/update";
JsonObject json = new JsonObject();
json.addProperty("openid", openid);
json.addProperty("to_groupid", to_groupid);
execute(new SimplePostRequestExecutor(), url, json.toString());
}
use of me.chanjar.weixin.common.util.http.SimplePostRequestExecutor in project weixin-java-tools by chanjarster.
the class WxMpServiceImpl method semanticQuery.
public WxMpSemanticQueryResult semanticQuery(WxMpSemanticQuery semanticQuery) throws WxErrorException {
String url = "https://api.weixin.qq.com/semantic/semproxy/search";
String responseContent = execute(new SimplePostRequestExecutor(), url, semanticQuery.toJson());
return WxMpSemanticQueryResult.fromJson(responseContent);
}
use of me.chanjar.weixin.common.util.http.SimplePostRequestExecutor in project weixin-java-tools by chanjarster.
the class WxMpServiceImpl method menuCreate.
public void menuCreate(WxMenu menu) throws WxErrorException {
if (menu.getMatchRule() != null) {
String url = "https://api.weixin.qq.com/cgi-bin/menu/addconditional";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
} else {
String url = "https://api.weixin.qq.com/cgi-bin/menu/create";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
}
}
Aggregations