Class IPlugin
插件引用
Inheritance
object
IPlugin
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Assembly: Plugin.dll
Syntax
Constructors
IPlugin()
Declaration
Properties
Author
插件作者
Declaration
public virtual string Author { get; }
Property Value
Config
config
Declaration
public virtual BaseConfig Config { get; set; }
Property Value
Description
插件描述
Declaration
public virtual string Description { get; }
Property Value
IsOpen
是否开启插件
Declaration
public virtual bool IsOpen { get; set; }
Property Value
Name
插件名称
可被重写
Declaration
public virtual string Name { get; }
Property Value
Version
插件版本
Declaration
public virtual string Version { get; }
Property Value
Methods
AddGroupMemberRequest(string, string, List<string>)
邀请好友进群(小于40人,直接进群)
Declaration
public Task<AddChatRoomMemberResponse> AddGroupMemberRequest(string origId, string groupUsername, List<string> memberList)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| List<string> |
memberList |
好友id列表 |
Returns
| Type |
Description |
| Task<AddChatRoomMemberResponse> |
|
添加企业好友
Declaration
public Task<AddOpenIMContactResp> AddOpenIMContact(string origId, string username, string ticket)
Parameters
| Type |
Name |
Description |
| string |
origId |
|
| string |
username |
|
| string |
ticket |
|
Returns
| Type |
Description |
| Task<AddOpenIMContactResp> |
|
BatchDelFavItem(string, uint)
删除收藏
Declaration
public Task<BatchDelFavItemResponse> BatchDelFavItem(string origId, uint id)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| uint |
id |
收藏id |
Returns
| Type |
Description |
| Task<BatchDelFavItemResponse> |
|
批量获取联系人
Declaration
public Task<BatchGetContactBriefInfoResponse> BatchGetContact(string origId, List<string> usernameList)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
usernameList |
用户名列表 |
Returns
| Type |
Description |
| Task<BatchGetContactBriefInfoResponse> |
|
批量获取联系人
Declaration
public Task<BatchGetContactProfileResponse> BatchGetContactProfile(string origId, List<string> usernameList)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
usernameList |
用户名列表 |
Returns
| Type |
Description |
| Task<BatchGetContactProfileResponse> |
|
BatchGetFavItem(string, uint)
获取收藏信息
Declaration
public Task<BatchGetFavItemResponse> BatchGetFavItem(string origId, uint id)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| uint |
id |
收藏id |
Returns
| Type |
Description |
| Task<BatchGetFavItemResponse> |
|
CdnSendImageNewImage(string, string, byte[])
改图发送
Declaration
public Task<CDNUploadMsgImgPrepareResponse> CdnSendImageNewImage(string origin, string toUser, byte[] imgBytes)
Parameters
| Type |
Name |
Description |
| string |
origin |
基础id |
| string |
toUser |
接受者 |
| byte[] |
imgBytes |
图片数据 |
Returns
| Type |
Description |
| Task<CDNUploadMsgImgPrepareResponse> |
|
CdnSendImageOriginImage(string, string, byte[])
原图发送
Declaration
public Task<CDNUploadMsgImgPrepareResponse> CdnSendImageOriginImage(string origin, string toUser, byte[] imgBytes)
Parameters
| Type |
Name |
Description |
| string |
origin |
基础id |
| string |
toUser |
接受者 |
| byte[] |
imgBytes |
图片数据 |
Returns
| Type |
Description |
| Task<CDNUploadMsgImgPrepareResponse> |
|
CdnSendVideo(string, string, byte[], byte[])
上传视频
Declaration
public Task<ABResponse> CdnSendVideo(string origId, string toUser, byte[] imgBytes, byte[] videoBytes)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUser |
接受者 |
| byte[] |
imgBytes |
图片数据 |
| byte[] |
videoBytes |
视频数据 |
Returns
| Type |
Description |
| Task<ABResponse> |
|
CdnUploadImage(string, string, byte[])
上传图片
Declaration
public Task<ABResponse> CdnUploadImage(string origId, string toUser, byte[] imgBytes)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUser |
接受者 |
| byte[] |
imgBytes |
图片数据 |
Returns
| Type |
Description |
| Task<ABResponse> |
|
CheckShortLink(string, string)
CheckShortLink
Declaration
public Task<CheckShortLinkResp> CheckShortLink(string origId, string url)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
url |
url |
Returns
| Type |
Description |
| Task<CheckShortLinkResp> |
|
CreateLabels(string, List<string>)
创建标签
Declaration
public Task<AddContactLabelResponse> CreateLabels(string origId, List<string> labelnameList)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
labelnameList |
标签名字 |
Returns
| Type |
Description |
| Task<AddContactLabelResponse> |
|
CreatGroupRequest(string, List<string>, string)
创建群聊
Declaration
public Task<CreateChatRoomResponse> CreatGroupRequest(string origId, List<string> memberList, string groupName = "")
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
memberList |
好友id列表 |
| string |
groupName |
群名称 |
Returns
| Type |
Description |
| Task<CreateChatRoomResponse> |
|
删除好友
Declaration
public Task<OpLogResponse> DelContact(string origId, List<string> usernames)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
usernames |
用户名 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
操作好友信息
Declaration
public Task<OpLogResponse> DelContact(string origId, string username, uint bitval)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
| uint |
bitval |
操作类型 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
删除好友
Declaration
public Task<OpLogResponse> DelContact(string origId, string username)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
DeleteLabel(string, int)
删除标签
Declaration
public Task<DelContcatLabelResponse> DeleteLabel(string origId, int labelId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| int |
labelId |
标签id |
Returns
| Type |
Description |
| Task<DelContcatLabelResponse> |
|
DelGroupMember(string, string, List<string>)
删除群成员
Declaration
public Task<DelChatRoomMemberResponse> DelGroupMember(string origId, string groupUsername, List<string> memberList)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| List<string> |
memberList |
好友id列表 |
Returns
| Type |
Description |
| Task<DelChatRoomMemberResponse> |
|
Dispose()
插件卸载
Declaration
public virtual void Dispose()
DownloadAppFile(string, string, string)
下载CDN文件
Declaration
public Task<byte[]> DownloadAppFile(string origId, string fileid, string aeskey)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
Returns
| Type |
Description |
| Task<byte[]> |
|
DownloadAppFileResponse(string, ulong, string)
下载文件
Declaration
public Task<DownloadResponse> DownloadAppFileResponse(string origId, ulong newMsgId, string xml)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
newMsgId |
消息id |
| string |
xml |
xml |
Returns
| Type |
Description |
| Task<DownloadResponse> |
|
DownloadImage(string, string, string, bool)
下载CDN图片
Declaration
public Task<byte[]> DownloadImage(string origId, string fileid, string aeskey, bool hd = false)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
| bool |
hd |
是否高清 |
Returns
| Type |
Description |
| Task<byte[]> |
|
DownloadImageResponse(string, ulong, string, bool)
下载图片
Declaration
public Task<DownloadResponse> DownloadImageResponse(string origId, ulong newMsgId, string xml, bool hd = false)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
newMsgId |
消息id |
| string |
xml |
xml |
| bool |
hd |
是否下载原图 |
Returns
| Type |
Description |
| Task<DownloadResponse> |
|
DownloadVideo(string, string, string)
下载CDN视频
Declaration
public Task<byte[]> DownloadVideo(string origId, string fileid, string aeskey)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
Returns
| Type |
Description |
| Task<byte[]> |
|
DownloadVideoResponse(string, ulong, string, long)
下载视频
Declaration
public Task<DownloadResponse> DownloadVideoResponse(string origId, ulong newMsgId, string xml, long msgId = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
newMsgId |
消息id |
| string |
xml |
xml |
| long |
msgId |
msgId |
Returns
| Type |
Description |
| Task<DownloadResponse> |
|
DownloadVideoThumbnail(string, string, string)
下载CDN视频缩略图
Declaration
public Task<byte[]> DownloadVideoThumbnail(string origId, string fileid, string aeskey)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
Returns
| Type |
Description |
| Task<byte[]> |
|
DownloadVoiceResponse(string, ulong, int, string, int)
下载语音
Declaration
public Task<DownloadResponse> DownloadVoiceResponse(string origId, ulong newMsgId, int totalLen, string clientImgId, int msgId = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
newMsgId |
消息id |
| int |
totalLen |
语音长度 |
| string |
clientImgId |
clientImgId |
| int |
msgId |
msgId |
Returns
| Type |
Description |
| Task<DownloadResponse> |
|
DownloadWeWorkImage(string, string, string, bool)
下载企业微信Cdn图片
Declaration
public Task<byte[]> DownloadWeWorkImage(string origId, string fileid, string aeskey, bool isHD = false)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
| bool |
isHD |
是否高清 |
Returns
| Type |
Description |
| Task<byte[]> |
|
DownloadWeWorkVideo(string, string, string)
下载企业微信Cdn视频
Declaration
public Task<byte[]> DownloadWeWorkVideo(string origId, string fileid, string aeskey)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
Returns
| Type |
Description |
| Task<byte[]> |
|
DownloadWeWorkVideoThumb(string, string, string)
下载企业微信Cdn视频缩略图
Declaration
public Task<byte[]> DownloadWeWorkVideoThumb(string origId, string fileid, string aeskey)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
fileid |
文件id |
| string |
aeskey |
aeskey |
Returns
| Type |
Description |
| Task<byte[]> |
|
修改备注信息
Declaration
public Task<OpLogResponse> EditContactRemark(string origId, string username, string remark)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
| string |
remark |
备注 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
修改好友信息
Declaration
public Task<OpLogResponse> EditCount(string origId, ModContact contact)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ModContact |
contact |
好友信息 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
Exceptions
| Type |
Condition |
| System.ArgumentException |
|
FavSync(string)
同步收藏
Declaration
public Task<FavSyncResponse> FavSync(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<FavSyncResponse> |
|
ForwardImageMsg(string, string, string, string, int, int, int, string, string, int)
转发图片
Declaration
public Task<UploadMsgImgResponse> ForwardImageMsg(string origId, string toUsername, string aesKey, string cdnUrl, int length, int midLength, int hdLength, string md5 = "", string xml = "", int encryType = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| string |
aesKey |
aesKey |
| string |
cdnUrl |
cdnUrl |
| int |
length |
长度 |
| int |
midLength |
中等长度 |
| int |
hdLength |
高清长度 |
| string |
md5 |
md5 |
| string |
xml |
xml |
| int |
encryType |
加密类型 |
Returns
| Type |
Description |
| Task<UploadMsgImgResponse> |
|
ForwardVideoMsg(string, string, string, string, int, int, int, int, int)
转发视频
Declaration
public Task<UploadVideoResponse> ForwardVideoMsg(string origId, string toUsername, string cdnAesKey, string cdnUrl, int playLength, int length, int thumbLength, int thumbHeigth, int thumbWidth)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| string |
cdnAesKey |
cdnAesKey |
| string |
cdnUrl |
cdnUrl |
| int |
playLength |
视频时长 |
| int |
length |
长度 |
| int |
thumbLength |
缩略图长度 |
| int |
thumbHeigth |
缩略图高度 |
| int |
thumbWidth |
缩略图宽度 |
Returns
| Type |
Description |
| Task<UploadVideoResponse> |
|
Get3rdA8Key(string, string, uint)
获取第三方Url的A8key
Declaration
public Task<GetA8KeyResp> Get3rdA8Key(string origId, string url, uint scene = 2)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
url |
基础url |
| uint |
scene |
搜索方式 |
Returns
| Type |
Description |
| Task<GetA8KeyResp> |
|
GetA8Key(string, string, uint)
获取A8Key
Declaration
public Task<GetA8KeyResp> GetA8Key(string origId, string url, uint scene = 2)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
url |
基础url |
| uint |
scene |
4:加群 |
Returns
| Type |
Description |
| Task<GetA8KeyResp> |
|
GetCdnInfo(string)
获取cdninfo
Declaration
public Task<GetCDNDnsResponse> GetCdnInfo(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<GetCDNDnsResponse> |
|
获取联系人(详细信息、黑粉查询)
Declaration
public Task<GetContactResponse> GetContact(string origId, List<string> usernameList, string groupUsernmae = "")
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
usernameList |
最多20个 |
| string |
groupUsernmae |
查询群成员 |
Returns
| Type |
Description |
| Task<GetContactResponse> |
|
GetGroupAnnouncement(string, string)
查询群公告
Declaration
public Task<GetChatRoomInfoDetailResponse> GetGroupAnnouncement(string origId, string groupUsername)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
Returns
| Type |
Description |
| Task<GetChatRoomInfoDetailResponse> |
|
GetGroupMembersDetial(string, string, uint)
获取群成员
Declaration
public Task<GetChatroomMemberDetailResponse> GetGroupMembersDetial(string origId, string groupUsername, uint clientVersion = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| uint |
clientVersion |
客户端版本 |
Returns
| Type |
Description |
| Task<GetChatroomMemberDetailResponse> |
|
GetLabelList(string)
获取所有标签
Declaration
public Task<GetContactLabelListResponse> GetLabelList(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<GetContactLabelListResponse> |
|
GetOnlineInfo(string)
获取登陆信息
Declaration
public Task<GetOnlineInfoResponse> GetOnlineInfo(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<GetOnlineInfoResponse> |
|
获取企业群里的企业微信信息
Declaration
public Task<GetOpenIMContactResp> GetOpenIMContact(string origId, string username, string groupUsername)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
企业微信号 |
| string |
groupUsername |
企业群号 |
Returns
| Type |
Description |
| Task<GetOpenIMContactResp> |
|
GetProfile(string)
获取账号信息
Declaration
public Task<GetProfileResponse> GetProfile(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<GetProfileResponse> |
|
GetQRCode(string, string)
获取二维码
Declaration
public Task<GetQRCodeResponse> GetQRCode(string origId, string username)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
Returns
| Type |
Description |
| Task<GetQRCodeResponse> |
|
GetSafetyInfo(string)
获取设备列表
Declaration
public Task<GetSafetyInfoResponse> GetSafetyInfo(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<GetSafetyInfoResponse> |
|
初始化通讯录
Declaration
public Task<InitContactResp> InitContact(string origId, int currentWxcontactSeq = 0, int currentChatRoomContactSeq = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| int |
currentWxcontactSeq |
好友序号 |
| int |
currentChatRoomContactSeq |
群序号 |
Returns
| Type |
Description |
| Task<InitContactResp> |
|
Initialize()
插件初始化
Declaration
public virtual void Initialize()
Install()
插件安装
Declaration
public virtual void Install()
InviteGroupMemberRequest(string, string, List<string>)
邀请好友进群(大于40人,发送邀请链接)
Declaration
public Task<InviteChatRoomMemberResponse> InviteGroupMemberRequest(string origId, string groupUsername, List<string> memberList)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| List<string> |
memberList |
好友id列表 |
Returns
| Type |
Description |
| Task<InviteChatRoomMemberResponse> |
|
JsOperate(string, string, string)
JsOperate
Declaration
public Task<JSOperateWxDataResponse> JsOperate(string origId, string appId, string json)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
appId |
appId |
| string |
json |
json |
Returns
| Type |
Description |
| Task<JSOperateWxDataResponse> |
|
LogOut(string)
退出
Declaration
public Task<LogOutResponse> LogOut(string origId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
Returns
| Type |
Description |
| Task<LogOutResponse> |
|
ModChatRoomMsgBox(string, string, uint)
修改是否折叠
Declaration
public Task<OpLogResponse> ModChatRoomMsgBox(string origId, string groupUsername, uint boxSwitch)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| uint |
boxSwitch |
是否折叠 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
ModDescription(string, string, string)
修改好友描述信息
Declaration
public Task<OpLogResponse> ModDescription(string origId, string username, string desc)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
| string |
desc |
描述 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
ModGroupName(string, string, string)
修改群名称
Declaration
public Task<OpLogResponse> ModGroupName(string origId, string groupUsername, string name)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| string |
name |
群名称 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
ModGroupNotice(string, string, string)
修改群公告
Declaration
public Task<SetChatRoomAnnouncementResponse> ModGroupNotice(string origId, string groupUsername, string content)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| string |
content |
公告内容 |
Returns
| Type |
Description |
| Task<SetChatRoomAnnouncementResponse> |
|
ModUserInfo(string, int, string)
修改资料
Declaration
public Task<OpLogResponse> ModUserInfo(string origId, int cmd, string value)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| int |
cmd |
1 修改昵称,2 修改签名 |
| string |
value |
值 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
OauthAuthorize(string, string, string)
授权网址
Declaration
public Task<OauthAuthorizeResp> OauthAuthorize(string origId, string url, string referer)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
url |
授权url |
| string |
referer |
授权参数 |
Returns
| Type |
Description |
| Task<OauthAuthorizeResp> |
授权返回 |
OnFriendMessage(WXUserLogin, ReceiveFriendMessageArgs)
收到好友信息
Declaration
public void OnFriendMessage(WXUserLogin sender, ReceiveFriendMessageArgs e)
Parameters
OnFriendRevokeMsg(WXUserLogin, ReceiveFriendMessageArgs)
收到好友撤回信息
Declaration
public void OnFriendRevokeMsg(WXUserLogin sender, ReceiveFriendMessageArgs e)
Parameters
OnGroupMemberEnter(WXUserLogin, ReceiveGroupMemberEnterArgs)
收到新人入群
Declaration
public void OnGroupMemberEnter(WXUserLogin sender, ReceiveGroupMemberEnterArgs e)
Parameters
OnGroupMemberQuit(WXUserLogin, ReceiveGroupMemberQuitArgs)
收到成员退群
Declaration
public void OnGroupMemberQuit(WXUserLogin sender, ReceiveGroupMemberQuitArgs e)
Parameters
OnGroupMessage(WXUserLogin, ReceiveGroupMessageArgs)
收到群信息
Declaration
public void OnGroupMessage(WXUserLogin sender, ReceiveGroupMessageArgs e)
Parameters
OnGroupNameChange(WXUserLogin, ReceiveGroupNameChangeArgs)
收到群成名称变动
Declaration
public void OnGroupNameChange(WXUserLogin sender, ReceiveGroupNameChangeArgs e)
Parameters
OnGroupRevokeMsg(WXUserLogin, ReceiveGroupMessageArgs)
收到群撤回信息
Declaration
public void OnGroupRevokeMsg(WXUserLogin sender, ReceiveGroupMessageArgs e)
Parameters
OnLog(string)
日志方法
Declaration
public void OnLog(string msg)
Parameters
| Type |
Name |
Description |
| string |
msg |
|
OnNewFriend(WXUserLogin, ReceiveNewFriendArgs)
收到好友请求
Declaration
public void OnNewFriend(WXUserLogin sender, ReceiveNewFriendArgs e)
Parameters
OnOtherDeviceMessage(WXUserLogin, ReceiveOtherDeviceMessageArgs)
收到其它设备输入的信息
Declaration
public void OnOtherDeviceMessage(WXUserLogin sender, ReceiveOtherDeviceMessageArgs e)
Parameters
OnReceiveQRCodePay(WXUserLogin, ReceiveQRCodePayArgs)
收到二维码付款信息
Declaration
public void OnReceiveQRCodePay(WXUserLogin sender, ReceiveQRCodePayArgs e)
Parameters
OnSystemMessage(WXUserLogin, ReceiveSystemMessageArgs)
收到系统消息
Declaration
public void OnSystemMessage(WXUserLogin sender, ReceiveSystemMessageArgs e)
Parameters
QuitGroup(string, string)
退出群聊
Declaration
public Task<OpLogResponse> QuitGroup(string origId, string groupUsername)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
RevokeMsg(string, ulong, string)
撤回信息
Declaration
public Task<RevokeMsgResponse> RevokeMsg(string origId, ulong newMsgId, string toUsername)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
newMsgId |
新消息id |
| string |
toUsername |
发送者 |
Returns
| Type |
Description |
| Task<RevokeMsgResponse> |
|
搜索微信号
Declaration
public Task<SearchContactResponse> SearchContact(string origId, string username, uint searchScene = 1)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
| uint |
searchScene |
搜索方式,1.手机号,2.二维码 |
Returns
| Type |
Description |
| Task<SearchContactResponse> |
|
搜索企业好友
Declaration
public Task<SearchOpenIMContactResp> SearchOpenIMContact(string origId, string url)
Parameters
| Type |
Name |
Description |
| string |
origId |
|
| string |
url |
|
Returns
| Type |
Description |
| Task<SearchOpenIMContactResp> |
|
SearchTagJump(string, string)
SearchTagJump
Declaration
public Task<SearchTagJumpResponse> SearchTagJump(string origId, string url)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
url |
url |
Returns
| Type |
Description |
| Task<SearchTagJumpResponse> |
|
SendAppMsg(string, string, string, int, int)
发送APP分享信息
Declaration
public Task<SendAppMsgResponse> SendAppMsg(string origId, string toUsername, string content, int type = 1, int source = 3)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| string |
content |
内容 |
| int |
type |
1 普通,6 文件 |
| int |
source |
文件类型 |
Returns
| Type |
Description |
| Task<SendAppMsgResponse> |
|
SendEmojiMsg(string, string, byte[], string)
发送表情信息
Declaration
public Task<UploadEmojiResponse> SendEmojiMsg(string origId, string toUsername, byte[] data, string externXml = "<gameext type=\"0\" content=\"0\" ></gameext>")
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| byte[] |
data |
数据 |
| string |
externXml |
表情扩展xml |
Returns
| Type |
Description |
| Task<UploadEmojiResponse> |
|
SendEmojiMsg(string, string, string, int, string?)
发送表情信息
Declaration
public Task<UploadEmojiResponse> SendEmojiMsg(string origId, string toUsername, string md5, int totalLen = 8429, string? externXml = "<gameext type=\"0\" content=\"0\" ></gameext>")
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| string |
md5 |
表情md5 |
| int |
totalLen |
表情长度 |
| string |
externXml |
表情扩展xml |
Returns
| Type |
Description |
| Task<UploadEmojiResponse> |
|
SendImageMsg(string, string, byte[])
发送图片信息
Declaration
public Task<UploadMsgImgResponse> SendImageMsg(string origId, string toUsername, byte[] data)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| byte[] |
data |
图片数据 |
Returns
| Type |
Description |
| Task<UploadMsgImgResponse> |
|
SendTextMsg(string, List<MultiMessageArgs>)
多信息发送
Declaration
public Task<NewSendMsgRespone> SendTextMsg(string origId, List<MultiMessageArgs> messages)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<MultiMessageArgs> |
messages |
消息列表 |
Returns
| Type |
Description |
| Task<NewSendMsgRespone> |
|
SendTextMsg(string, List<string>, string, string, uint)
给多人发送文本信息
Declaration
public Task<NewSendMsgRespone> SendTextMsg(string origId, List<string> usernameList, string content, string atList = "", uint type = 1)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| List<string> |
usernameList |
接受者 |
| string |
content |
内容 |
| string |
atList |
at列表 |
| uint |
type |
类型:1 普通信息,42 名片信息 |
Returns
| Type |
Description |
| Task<NewSendMsgRespone> |
|
SendTextMsg(string, string, string, string, uint)
发送文本消息
Declaration
public Task<SendResponseArgs> SendTextMsg(string origId, string toUsername, string content, string atUsernames = "", uint type = 1)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| string |
content |
[内容,支持一些标签:<br/>
1. [@{username}] 会@username<br/>
2. 以<appmsg开头,以</appmsg>结尾的内容会被当成app<br/>
3. [Image={path}] 会发送图片<br/>
4. [Image={url}] 会发送图片<br/>
5. [emoji=dice:{num}}] 会发送指定的骰子<br/>
6. [emoji=rock:{num}}] 会发送指定的石头剪刀布<br/>
7. [emoji=md5:{md5}}] 会发送指定的emoji<br/>
8. [card={username}] 会发送名片<br/>
|
| string |
atUsernames |
at列表 |
| uint |
type |
类型:1 普通信息,42 名片信息 |
Returns
SendVideoMsg(string, string, uint, byte[], byte[])
发送视频信息
Declaration
public Task<UploadVideoResponse> SendVideoMsg(string origId, string toUsername, uint playLength, byte[] imgBuffer, byte[] buffer)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| uint |
playLength |
视频时长 |
| byte[] |
imgBuffer |
视频封面 |
| byte[] |
buffer |
视频数据 |
Returns
| Type |
Description |
| Task<UploadVideoResponse> |
|
SendVoiceMsg(string, string, byte[], int, int)
发送语音信息
Declaration
public Task<UploadVoiceResponse> SendVoiceMsg(string origId, string toUsername, byte[] data, int voiceSecond = 10, int voiceFormat = 4)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| byte[] |
data |
语音数据 |
| int |
voiceSecond |
语音长度(秒) |
| int |
voiceFormat |
-1(UNKNOWN),0(AMR),1(SPEEX),2(MP3),3(WAVE),4(SILK) |
Returns
| Type |
Description |
| Task<UploadVoiceResponse> |
|
SetAddFriendFunction(string, uint)
设置添加好友的方式
Declaration
public Task<OpLogResponse> SetAddFriendFunction(string origId, uint swicth)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| uint |
swicth |
1 任何人,2 通过验证,3 通过验证或邀请,4 仅限手机联系人 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
SetNickname(string, string)
设置昵称
Declaration
public Task<OpLogResponse> SetNickname(string origId, string nickname)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
nickname |
昵称 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
SetPwd(string, string, string)
设置密码
Declaration
public Task<SetPwdResponse> SetPwd(string origId, string password, string ticket)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
password |
密码 |
| string |
ticket |
ticket |
Returns
| Type |
Description |
| Task<SetPwdResponse> |
|
SetSign(string, string)
设置签名
Declaration
public Task<OpLogResponse> SetSign(string origId, string sign)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
sign |
签名 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
Setting()
插件设置
Declaration
public virtual BaseConfig Setting()
Returns
SnsCancelLike(string, ulong)
取消点赞
Declaration
public Task<SnsObjectOpResponse> SnsCancelLike(string origId, ulong snsId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
Returns
| Type |
Description |
| Task<SnsObjectOpResponse> |
|
朋友圈评论
Declaration
public Task<SnsCommentResponse> SnsComment(string origId, ulong snsId, string content, int replyCommentId = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
| string |
content |
评论内容 |
| int |
replyCommentId |
回复评论ID |
Returns
| Type |
Description |
| Task<SnsCommentResponse> |
|
SnsCreatePoi(string, string, string, string, string, float, float, string)
创建朋友圈地点
Declaration
public Task<CreatePoiResponse> SnsCreatePoi(string origId, string name, string city = "北京市", string district = "东城区", string street = "长安街", float longitude = 116.39745, float latitude = 39.908794, string mobile = "")
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
name |
地点名称 |
| string |
city |
城市 |
| string |
district |
区 |
| string |
street |
街道 |
| float |
longitude |
经度 |
| float |
latitude |
纬度 |
| string |
mobile |
手机号 |
Returns
| Type |
Description |
| Task<CreatePoiResponse> |
|
SnsDelete(string, ulong)
删除朋友圈内容
Declaration
public Task<SnsObjectOpResponse> SnsDelete(string origId, ulong snsId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
Returns
| Type |
Description |
| Task<SnsObjectOpResponse> |
|
删除评论
Declaration
public Task<SnsObjectOpResponse> SnsDeleteComment(string origId, ulong snsId, int commentId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
| int |
commentId |
评论ID |
Returns
| Type |
Description |
| Task<SnsObjectOpResponse> |
|
SnsGetTimeLine(string, string, ulong)
实时获取朋友圈主页
Declaration
public Task<SnsTimeLineResponse> SnsGetTimeLine(string origId, string pageMd5 = "", ulong lastSnsId = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
pageMd5 |
翻页MD5值 |
| ulong |
lastSnsId |
翻页时传入上一页最后一条SnsId |
Returns
| Type |
Description |
| Task<SnsTimeLineResponse> |
|
SnsGetUserPage(string, string, string, ulong)
实时获取某人朋友圈主页
Declaration
public Task<SnsUserPageResponse> SnsGetUserPage(string origId, string username, string pageMd5 = "", ulong lastSnsId = 0)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
| string |
pageMd5 |
翻页的md5值 |
| ulong |
lastSnsId |
翻页带上 |
Returns
| Type |
Description |
| Task<SnsUserPageResponse> |
|
SnsLike(string, ulong)
朋友圈点赞
Declaration
public Task<SnsCommentResponse> SnsLike(string origId, ulong snsId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
Returns
| Type |
Description |
| Task<SnsCommentResponse> |
|
SnsObjectDetail(string, ulong)
获取朋友圈详情
Declaration
public Task<SnsObjectDetailResponse> SnsObjectDetail(string origId, ulong snsIs)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsIs |
朋友圈id |
Returns
| Type |
Description |
| Task<SnsObjectDetailResponse> |
|
SnsPost(string, string, List<string>?, List<string>?, List<string>?, List<uint>?)
发送朋友圈
Declaration
public Task<SnsPostResponse> SnsPost(string origId, string content, List<string>? atUsernameList = null, List<string>? allowUsernameList = null, List<string>? forbidUsernameList = null, List<uint>? forbidLabelList = null)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
content |
xml |
| List<string> |
atUsernameList |
@用户列表 |
| List<string> |
allowUsernameList |
指定用户可看 |
| List<string> |
forbidUsernameList |
指定用户不可看 |
| List<uint> |
forbidLabelList |
指定标签不可看 |
Returns
| Type |
Description |
| Task<SnsPostResponse> |
|
SnsSetOpen(string, ulong)
设为公开内容
Declaration
public Task<SnsObjectOpResponse> SnsSetOpen(string origId, ulong snsId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
Returns
| Type |
Description |
| Task<SnsObjectOpResponse> |
|
SnsSetPrivate(string, ulong)
设为隐私内容
Declaration
public Task<SnsObjectOpResponse> SnsSetPrivate(string origId, ulong snsId)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| ulong |
snsId |
朋友圈id |
Returns
| Type |
Description |
| Task<SnsObjectOpResponse> |
|
SnsUploadFile(string, byte[])
上传文件取URL
Declaration
public Task<SnsUploadResponse> SnsUploadFile(string origId, byte[] data)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| byte[] |
data |
文件数据 |
Returns
| Type |
Description |
| Task<SnsUploadResponse> |
|
SwicthFunctionForAddFriend(string, bool)
添加好友是否需要验证
Declaration
public Task<OpLogResponse> SwicthFunctionForAddFriend(string origId, bool swicth)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| bool |
swicth |
是否需要验证 |
Returns
| Type |
Description |
| Task<OpLogResponse> |
|
Terminate()
插件终止
Declaration
public virtual void Terminate()
TransferGroupOwner(string, string, string)
转让群主
Declaration
public Task<TransferGroupOwnerResponse> TransferGroupOwner(string origId, string groupUsername, string newUsername)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
groupUsername |
群id |
| string |
newUsername |
新群主id |
Returns
| Type |
Description |
| Task<TransferGroupOwnerResponse> |
|
UpdataFriendLabels(string, string, List<int>)
设置好友标签
Declaration
public Task<ModifContactLabelResponse> UpdataFriendLabels(string origId, string username, List<int> labelIdList = null)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
用户名 |
| List<int> |
labelIdList |
标签列表 |
Returns
| Type |
Description |
| Task<ModifContactLabelResponse> |
|
UpdataLabelName(string, int, string)
设置标签名称
Declaration
public Task<UpdataContactLabelResponse> UpdataLabelName(string origId, int labelId, string labelname)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| int |
labelId |
标签id |
| string |
labelname |
新名称 |
Returns
| Type |
Description |
| Task<UpdataContactLabelResponse> |
|
UpdateSafeDevice(string, string, string)
设置设备名称
Declaration
public Task<UpdateSafeDeviceResponse> UpdateSafeDevice(string origId, string newName, string deviceType)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
newName |
新名称 |
| string |
deviceType |
设备类型 |
Returns
| Type |
Description |
| Task<UpdateSafeDeviceResponse> |
|
UploadAppAttach(string, string, byte[])
上传文件
Declaration
public Task<UploadAppAttachResponse> UploadAppAttach(string origId, string toUsername, byte[] data)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
toUsername |
接受者 |
| byte[] |
data |
数据 |
Returns
| Type |
Description |
| Task<UploadAppAttachResponse> |
|
UploadHeadImage(string, byte[])
设置高清头像
Declaration
public Task<UploadHDHeadImgResponse> UploadHeadImage(string origId, byte[] data)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| byte[] |
data |
头像数据 |
Returns
| Type |
Description |
| Task<UploadHDHeadImgResponse> |
|
UploadSnsImage(string, byte[])
上传朋友圈图片
Declaration
public Task<UploadSnsResponse> UploadSnsImage(string origId, byte[] imgBytes)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| byte[] |
imgBytes |
图片数据 |
Returns
| Type |
Description |
| Task<UploadSnsResponse> |
|
UploadSnsVideo(string, byte[], byte[], int)
上传朋友圈视频
Declaration
public Task<UploadSnsResponse> UploadSnsVideo(string origId, byte[] imgBytes, byte[] videoBytes, int largesVideo = 30)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| byte[] |
imgBytes |
图片数据 |
| byte[] |
videoBytes |
视频数据 |
| int |
largesVideo |
视频时间 |
Returns
| Type |
Description |
| Task<UploadSnsResponse> |
|
VerifyPswd(string, string)
验证密码
Declaration
public Task<VerifyPswdResponse> VerifyPswd(string origId, string password)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
password |
密码 |
Returns
| Type |
Description |
| Task<VerifyPswdResponse> |
|
VerifyUser(string, string?, string?, string?, string, int, int)
验证用户
Declaration
public Task<VerifyUserResponse> VerifyUser(string origId, string? username, string? verifyUserTicket, string? antispamTicket, string content = "", int opcode = 2, int scene = 17)
Parameters
| Type |
Name |
Description |
| string |
origId |
基础id |
| string |
username |
v1 |
| string |
verifyUserTicket |
v2 |
| string |
antispamTicket |
|
| string |
content |
打招呼内容 |
| int |
opcode |
2 添加好友,3 同意好友请求,4 拒绝好友请求 |
| int |
scene |
Scene
1 - 通过QQ好友添加--可以
2 - 通过搜索邮箱--可加但无提示
3 - 通过微信号搜索--可以
5 - 通过朋友验证消息-可加但无提示
7 - 通过朋友验证消息(可回复)-可加但无提示
12 - 来自QQ好友--可以
13 - 通过手机通讯录添加--可以
14 - 通过群来源--可以
15 - 通过搜索手机号--可以
16 - 通过朋友验证消息-可加但无提示
17 - 通过名片分享--可以
18 - 通过附近的人--可以(貌似只需要v1就够了)
22 - 通过摇一摇打招呼方式--可以
25 - 通过漂流瓶---no
30 - 通过二维码方式--可以
|
Returns
| Type |
Description |
| Task<VerifyUserResponse> |
|
Events
ReceiveFriendMessage
收到好友信息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveFriendMessageArgs> ReceiveFriendMessage
Event Type
ReceiveFriendRevokeMsg
收到好友撤回信息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveFriendMessageArgs> ReceiveFriendRevokeMsg
Event Type
ReceiveGroupMemberEnter
收到新人入群
Declaration
public event IPlugin.EventAsyncHandler<ReceiveGroupMemberEnterArgs> ReceiveGroupMemberEnter
Event Type
ReceiveGroupMemberQuit
收到成员退群
Declaration
public event IPlugin.EventAsyncHandler<ReceiveGroupMemberQuitArgs> ReceiveGroupMemberQuit
Event Type
ReceiveGroupMessage
收到群信息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveGroupMessageArgs> ReceiveGroupMessage
Event Type
ReceiveGroupNameChange
收到群名称变化
Declaration
public event IPlugin.EventAsyncHandler<ReceiveGroupNameChangeArgs> ReceiveGroupNameChange
Event Type
ReceiveGroupRevokeMsg
收到群撤回信息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveGroupMessageArgs> ReceiveGroupRevokeMsg
Event Type
ReceiveNewFriend
收到加好友请求
Declaration
public event IPlugin.EventAsyncHandler<ReceiveNewFriendArgs> ReceiveNewFriend
Event Type
ReceiveOtherDeviceMessage
收入其它设备输入的信息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveOtherDeviceMessageArgs> ReceiveOtherDeviceMessage
Event Type
ReceiveQRCodePay
收到二维码付款信息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveQRCodePayArgs> ReceiveQRCodePay
Event Type
ReceiveSystemMessage
收到系统消息
Declaration
public event IPlugin.EventAsyncHandler<ReceiveSystemMessageArgs> ReceiveSystemMessage
Event Type