C# Class Senparc.Weixin.Work.AdvancedAPIs.MassApi

发送消息
Afficher le fichier Open project: JeffreySu/WeiXinMPSDK

Méthodes publiques

Méthode Description
SendFile ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送文件消息

SendFileAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送文件消息

SendImage ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送图片消息

SendImageAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送图片消息

SendMpNews ( string accessToken, string toUser, string toParty, string toTag, string agentId, List articles, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送mpnews消息 注:mpnews消息与news消息类似,不同的是图文消息内容存储在微信后台,并且支持保密选项。

SendMpNewsAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, List articles, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送mpnews消息 注:mpnews消息与news消息类似,不同的是图文消息内容存储在微信后台,并且支持保密选项。

SendNews ( string accessToken, string toUser, string toParty, string toTag, string agentId, List
articles, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送图文消息

SendNewsAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, List
articles, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送图文消息

SendText ( string accessToken, string toUser, string toParty, string toTag, string agentId, string content, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送文本信息

SendTextAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string content, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送文本信息

SendVideo ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, string title, string description, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送视频消息

SendVideoAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, string title, string description, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送视频消息

SendVoice ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : MassResult

发送语音消息

SendVoiceAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : Task

【异步方法】发送语音消息

Method Details

SendFile() public static méthode

发送文件消息
public static SendFile ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendFileAsync() public static méthode

【异步方法】发送文件消息
public static SendFileAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task

SendImage() public static méthode

发送图片消息
public static SendImage ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendImageAsync() public static méthode

【异步方法】发送图片消息
public static SendImageAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task

SendMpNews() public static méthode

发送mpnews消息 注:mpnews消息与news消息类似,不同的是图文消息内容存储在微信后台,并且支持保密选项。
public static SendMpNews ( string accessToken, string toUser, string toParty, string toTag, string agentId, List articles, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
articles List
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendMpNewsAsync() public static méthode

【异步方法】发送mpnews消息 注:mpnews消息与news消息类似,不同的是图文消息内容存储在微信后台,并且支持保密选项。
public static SendMpNewsAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, List articles, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
articles List
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task

SendNews() public static méthode

发送图文消息
public static SendNews ( string accessToken, string toUser, string toParty, string toTag, string agentId, List
articles, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
articles List
图文信息内容,包括title(标题)、description(描述)、url(点击后跳转的链接。企业可根据url里面带的code参数校验员工的真实身份)和picurl(图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片)
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendNewsAsync() public static méthode

【异步方法】发送图文消息
public static SendNewsAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, List
articles, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
articles List
图文信息内容,包括title(标题)、description(描述)、url(点击后跳转的链接。企业可根据url里面带的code参数校验员工的真实身份)和picurl(图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片)
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task

SendText() public static méthode

发送文本信息
public static SendText ( string accessToken, string toUser, string toParty, string toTag, string agentId, string content, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
content string 消息内容
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendTextAsync() public static méthode

【异步方法】发送文本信息
public static SendTextAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string content, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
content string 消息内容
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task

SendVideo() public static méthode

发送视频消息
public static SendVideo ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, string title, string description, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
title string 视频消息的标题
description string 视频消息的描述
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendVideoAsync() public static méthode

【异步方法】发送视频消息
public static SendVideoAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, string title, string description, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
title string 视频消息的标题
description string 视频消息的描述
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task

SendVoice() public static méthode

发送语音消息
public static SendVoice ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : MassResult
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Senparc.Weixin.Work.AdvancedAPIs.Mass.MassResult

SendVoiceAsync() public static méthode

【异步方法】发送语音消息
public static SendVoiceAsync ( string accessToken, string toUser, string toParty, string toTag, string agentId, string mediaId, int safe, int timeOut = Config.TIME_OUT ) : Task
accessToken string 调用接口凭证
toUser string UserID列表(消息接收者,多个接收者用‘|’分隔)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
toParty string PartyID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
toTag string TagID列表,多个接受者用‘|’分隔。当touser为@all时忽略本参数
agentId string 企业应用的id,可在应用的设置页面查看
mediaId string 媒体资源文件ID
safe int 表示是否是保密消息,0表示否,1表示是,默认0
timeOut int 代理请求超时时间(毫秒)
Résultat Task