public class WxCpGroupRobotServiceImpl extends Object implements WxCpGroupRobotService
构造器和说明 |
---|
WxCpGroupRobotServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
void |
sendImage(String base64,
String md5)
发送image类型的消息
|
void |
sendImage(String webhookUrl,
String base64,
String md5)
发送image类型的消息
|
void |
sendMarkdown(String content)
发送markdown类型的消息
|
void |
sendMarkdown(String webhookUrl,
String content)
发送markdown类型的消息
|
void |
sendNews(List<NewArticle> articleList)
发送news类型的消息
|
void |
sendNews(String webhookUrl,
List<NewArticle> articleList)
发送news类型的消息
|
void |
sendText(String content,
List<String> mentionedList,
List<String> mobileList)
发送text类型的消息
|
void |
sendText(String webhookUrl,
String content,
List<String> mentionedList,
List<String> mobileList)
发送text类型的消息
|
public void sendText(String content, List<String> mentionedList, List<String> mobileList) throws WxErrorException
WxCpGroupRobotService
sendText
在接口中 WxCpGroupRobotService
content
- 文本内容,最长不超过2048个字节,必须是utf8编码mentionedList
- userId的列表,提醒群中的指定成员(@某个成员),@all表示提醒所有人,如果开发者获取不到userId,可以使用mentioned_mobile_listmobileList
- 手机号列表,提醒手机号对应的群成员(@某个成员),@all表示提醒所有人WxErrorException
- 异常public void sendMarkdown(String content) throws WxErrorException
WxCpGroupRobotService
sendMarkdown
在接口中 WxCpGroupRobotService
content
- markdown内容,最长不超过4096个字节,必须是utf8编码WxErrorException
- 异常public void sendImage(String base64, String md5) throws WxErrorException
WxCpGroupRobotService
sendImage
在接口中 WxCpGroupRobotService
base64
- 图片内容的base64编码md5
- 图片内容(base64编码前)的md5值WxErrorException
- 异常public void sendNews(List<NewArticle> articleList) throws WxErrorException
WxCpGroupRobotService
sendNews
在接口中 WxCpGroupRobotService
articleList
- 图文消息,支持1到8条图文WxErrorException
- 异常public void sendText(String webhookUrl, String content, List<String> mentionedList, List<String> mobileList) throws WxErrorException
WxCpGroupRobotService
sendText
在接口中 WxCpGroupRobotService
webhookUrl
- webhook地址content
- 文本内容,最长不超过2048个字节,必须是utf8编码mentionedList
- userId的列表,提醒群中的指定成员(@某个成员),@all表示提醒所有人,如果开发者获取不到userId,可以使用mentioned_mobile_listmobileList
- 手机号列表,提醒手机号对应的群成员(@某个成员),@all表示提醒所有人WxErrorException
- 异常public void sendMarkdown(String webhookUrl, String content) throws WxErrorException
WxCpGroupRobotService
sendMarkdown
在接口中 WxCpGroupRobotService
webhookUrl
- webhook地址content
- markdown内容,最长不超过4096个字节,必须是utf8编码WxErrorException
- 异常public void sendImage(String webhookUrl, String base64, String md5) throws WxErrorException
WxCpGroupRobotService
sendImage
在接口中 WxCpGroupRobotService
webhookUrl
- webhook地址base64
- 图片内容的base64编码md5
- 图片内容(base64编码前)的md5值WxErrorException
- 异常public void sendNews(String webhookUrl, List<NewArticle> articleList) throws WxErrorException
WxCpGroupRobotService
sendNews
在接口中 WxCpGroupRobotService
webhookUrl
- webhook地址articleList
- 图文消息,支持1到8条图文WxErrorException
- 异常Copyright © 2021. All rights reserved.