using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PCRobot.PCWechat
{
public class BaseApi
{
public static bool IsInstall { get; protected set; } = false;
public static bool IsKsfInstall { get; protected set; } = false;
public static bool IsQYInstall { get; protected set; } = false;
public WechatUser User { get; private set; }
public BaseApi(WechatUser User)
{
this.User = User;
}
const string NotImplemented = "当前版本暂时不支持此操作!";
///
/// 服务器的消息包命令
///
public string ServerMsgID { get; set; }
///
/// 发送消息
///
/// 发给谁
/// 消息内容
public virtual void SendMessage(string wxid, string message) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送文件消息
///
/// 接收者的微信
/// 文件的路径
public virtual void SendFile(string wxid, string file) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取朋友圈
///
/// 首页传0,后续的最后一个朋友圈的object_id
/// 获取谁的朋友圈,为空时查询朋友圈首页
public virtual void FindCircles(string circleId, string username) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 小程序自动授权登录
///
/// 小程序的id
public virtual void AutoAuthMiniAPPLogin(string appid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送朋友圈
///
/// 朋友圈xml
public virtual void SendCircle(string xmlmsg) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送朋友圈评论
///
///
///
public virtual void SendCircleComment(string circleId, string content) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 朋友圈点赞
///
/// 朋友圈的object_id
public virtual void SendCirclePraise(string circleId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 朋友圈上传本地图片
///
///
public virtual void CircleUpLoadImage(string path) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送图片
///
/// 接收者的微信
/// 图片的路径
public virtual void SendImage(string wxid, string path) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送视频
/// MT_SEND_VIDEOMSG
///
public virtual void SendVideo(string wxid, string path) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送小程序
///
///
///
public virtual void SendProgramMessage(string wxid, string dataJson) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 查询好友信息
///
/// 好友的微信ID
public virtual void GetFriend(string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 同意加我好友
///
/// 申请好友的校验信息
public virtual void AgreeAddMe(string text) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 发送卡片
///
/// 接收者的微信
/// 名片人的微信
public virtual void SendCard(string to_wxid, string card_wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 创建群(支持企业和普通微信)
///
///
public virtual void CreateRoom(string wxidData) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 邀请用户进群,40人以下无需告知用户,直接进群
///
///
public virtual void InviteMemberToRoom_40Down(string groupid, string wxidData) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 邀请用户进群,40人以上发送群邀请卡片
///
///
public virtual void InviteMemberToRoom_40Up(string groupId, string wxidData) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 移除群用户
///
/// 群id
/// 用户账号
public virtual void DeleteRoomMember(string wxid, string room) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取通讯录
///
public virtual void GetContact() { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取通信录刷新
///
///
public virtual void GetContact(bool isUpdate) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取好友列表
///
/// 刷新缓存数据
///
//public virtual List GetFriendInfos(bool flushGroupsCache = false) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
public virtual string GetFriendInfos(bool flushGroupsCache = false) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取群列表(不包含群成员)
///
public virtual void GetGroupsNotInMember() { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 领取转账
///
///
public virtual void PayTransferConfirm(string data) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 删除好友
///
/// 要删除的好友微信
public virtual void DeleteFriend(string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 用户备注
///
/// 备注的用户微信
/// 备注的内容,删除备注内容为空
public virtual void EditCotacts(string wxid, string remark) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 置顶
///
/// 好友或群聊wxid
/// 0是取消置顶,1置顶
public virtual void StateOpt(string wxid, int status) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取微信用户的详细信息
///
///
public virtual void GetWxidInfo(string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取群和用户
///
///
public virtual void GetGroupAndFriendInfo(string groupId, string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取群和用户
///
///
///
public virtual void GetGroupAndFriendInfo(string groupId, string wxid, bool flush = false) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取群成员
///
///
public virtual void GetGroupMemer(string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 刷新微信用户的详细信息(网络刷新)
///
///
public virtual void UpdateWxidInfo(string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 解密微信加密的图片(.dat)
///
/// 微信加密图片路径
/// 解密后的文件路径
public virtual void DecryptImage(string src_file, string dest_file) { throw new Exception(NotImplemented); }
///
/// 刷新微信群的详细信息(网络刷新)
///
///
public virtual void UpdateGroupInfo(string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 获取当前登录版本微信
///
public virtual string GetVersion() { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 退出当前微信
///
public virtual void CloseWechat(string message) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 检测URL在微信中是否有效
///
///
///
public virtual void CheckUrl(string url) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 打开内置浏览器
///
///
public virtual void OpenUrl(string url) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 清理历史聊天记录
///
public virtual void ClearChatHistoryMsg() { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 设置会话为已读
///
public virtual void SetSessionReadedMsg(string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 修改群聊名称
///
/// 新的群名
/// 群id
public virtual void SetRoomName(string new_name, string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 修改群公告(可用于@全体)
///
/// 新公告
/// 群聊wxid
public virtual void SetRoomNotice(string notice, string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 设置自己在群中昵称
///
/// 要设置的昵称
/// 需要设置的群id
public virtual void ModRoomMyName(string nickname, string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 设置是否显示群成员昵称
///
/// true为开启
/// 要显示得到群
public virtual void SetRoomShowMemeberName(bool status, string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 修改群聊名称
///
/// 新名称
/// 群号
public virtual void ModRoomName(string newnick, string groupId) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 是否消息免打扰
///
/// true为开启
/// wxid
public virtual void SetRecvNotify(bool status, string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 关注公众号
///
/// 公众号wxid
public virtual void AddPublicUser(string wxid) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
///
/// 开启/关闭防撤回功能
///
/// 1是开启防撤回,0是关闭
public virtual void SetDisableRevoke(bool status) { throw new Exception(NotImplemented + new System.Diagnostics.StackTrace().GetFrame(0).GetMethod()?.Name); }
public virtual
}
}