All Projects → leestar54 → Webwechatapi.net

leestar54 / Webwechatapi.net

Licence: mit
基于.Net平台C#的微信网页版API

Labels

Projects that are alternatives of or similar to Webwechatapi.net

Agora Miniapp Tutorial
Hello world for Agora SDK running in https://en.wikipedia.org/wiki/WeChat#WeChat_Mini_Program
Stars: ✭ 75 (-15.73%)
Mutual labels:  wechat
Flutter Wechat
🔥A flutter app which clones wechat,it's based on flutter and dart, it's on the road! 这是一个仿照微信样式基于flutter实现的app,还在继续完善中,使用到了flutter中大多数的组件,适合以此项目进行flutter学习。 https://dzou.top
Stars: ✭ 80 (-10.11%)
Mutual labels:  wechat
Wechat Webapp Douban Movie
微信小程序开发之豆瓣电影
Stars: ✭ 84 (-5.62%)
Mutual labels:  wechat
Weapp Qrcode
weapp.qrcode.js 在 微信小程序 中,快速生成二维码
Stars: ✭ 1,194 (+1241.57%)
Mutual labels:  wechat
Easy Wechat Script
some simple wechat scripts based on itchat ,which may be useful for your daily life
Stars: ✭ 78 (-12.36%)
Mutual labels:  wechat
Qq Wechat Emotion Parser
QQ、微信表情符号解析:字符串到图片URL
Stars: ✭ 82 (-7.87%)
Mutual labels:  wechat
Wxapp Mall
微信小程序 商城demo
Stars: ✭ 1,190 (+1237.08%)
Mutual labels:  wechat
Wxchart
微信小程序,图表组件(柱状图、折线图、饼图、雷达图...)。持续更新中...
Stars: ✭ 87 (-2.25%)
Mutual labels:  wechat
Wechat
Deprecated 微信公众平台企业号 SDK
Stars: ✭ 78 (-12.36%)
Mutual labels:  wechat
Wechat
API, command and message handling for WeChat in Rails
Stars: ✭ 1,251 (+1305.62%)
Mutual labels:  wechat
Cordova Plugin Wechat
A cordova plugin, a JS version of Wechat SDK
Stars: ✭ 1,198 (+1246.07%)
Mutual labels:  wechat
Mina Webpack
🍱 Mina single-file-component meets Webpack
Stars: ✭ 77 (-13.48%)
Mutual labels:  wechat
Wcdb
WCDB is a cross-platform database framework developed by WeChat.
Stars: ✭ 9,264 (+10308.99%)
Mutual labels:  wechat
Wechat Dump
Cracking encrypted wechat message history from android
Stars: ✭ 1,195 (+1242.7%)
Mutual labels:  wechat
Machinery Industry Press
本项目预计分享数千册电子书,98%以上为机械工业出版社原版电子书,其余为其它出版社出版的一些经典外文读物的原版译本电子书,每本书都配有当当网一键搜索,可查看书价格和简介。目前共计更新2542册图书
Stars: ✭ 85 (-4.49%)
Mutual labels:  wechat
Fitness
Flutter 仿微博客户端!A Weibo client application developed with Flutter, which supports both Android and iOS.
Stars: ✭ 75 (-15.73%)
Mutual labels:  wechat
Wechat Miniprogram Ar 3d
A WeChat MiniProgram 3D that includes a Panorama Viewer and a 3D Viewer using the device orientation control.
Stars: ✭ 80 (-10.11%)
Mutual labels:  wechat
Wechatdemo
macOS WeChat 仿微信MAC端 QQ NSCollectionView,NSSplitView,ect..
Stars: ✭ 87 (-2.25%)
Mutual labels:  wechat
Anti Recall
Android 免root 防撤回神器 !
Stars: ✭ 1,274 (+1331.46%)
Mutual labels:  wechat
Night
Weekly Go Online Meetup via Bilibili|Go 夜读|通过 bilibili 在线直播的方式分享 Go 相关的技术话题,每天大家在微信/telegram/Slack 上及时沟通交流编程技术话题。
Stars: ✭ 10,058 (+11201.12%)
Mutual labels:  wechat

WebWeChat.Net

基于.Net平台C#的微信网页版API

注:交互过程可以使用fiddler工具分析

近期更新

  • 新增已知问题过滤,包括:千人账号无法获取好友列表,新注册账号无法登陆网页版
  • 优化稳定性,开发环境升级.Net至4.6。因为win7系统偶尔会出现The request was aborted: Could not create SSL/TLS secure channel,而win10没有问题。经研究是.Net自身对于tls协议支持上的bug,建议将系统补丁打至最新,并且framework升级至最新4.7.1,framework下载地址:https://www.microsoft.com/net/download/thank-you/net471
  • 实现API基础功能

开发环境

vs2015+.net4.6.1 framework

依赖项

json.net

Feature

  • 最小依赖,使用简单
  • 支持同步、基于事件回调的异步方法
  • 对象间隔离,可以实例化无数客户端

简单使用

具体内容见源码,此处仅简单说明

static void Main(string[] args)
{
    Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
    AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

    client = new Client();
    qrForm = new QrCodeForm();

    client.ExceptionCatched += Client_ExceptionCatched; ;
    client.GetLoginQrCodeComplete += Client_GetLoginQrCodeComplete; ;
    client.CheckScanComplete += Client_CheckScanComplete; ;
    client.LoginComplete += Client_LoginComplete; ;
    client.BatchGetContactComplete += Client_BatchGetContactComplete; ;
    client.GetContactComplete += Client_GetContactComplete; ;
    client.MPSubscribeMsgListComplete += Client_MPSubscribeMsgListComplete; ;
    client.LogoutComplete += Client_LogoutComplete; ;
    client.ReceiveMsg += Client_ReceiveMsg; ;
    client.DelContactListComplete += Client_DelContactListComplete; ;
    client.ModContactListComplete += Client_ModContactListComplete;
  
    Console.WriteLine("小助手启动");
    client.Start();
    qrForm.ShowDialog();

    Console.ReadLine();
    client.Close();
    Console.ReadLine();
    client.Logout();
}

方法说明

/// <summary>
/// 异步发送文字消息
/// </summary>
/// <param name="msg">消息</param>
/// <param name="toUserName">发送人UserName</param>
public void SendMsgAsync(string msg, string toUserName)

/// <summary>
/// 同步发送文字消息
/// </summary>
/// <param name="msg">文字</param>
/// <param name="toUserName">发送人UserName</param>
/// <returns></returns>
public SendMsgResponse SendMsg(string msg, string toUserName)

/// <summary>
/// 异步发送文件
/// </summary>
/// <param name="fileInfo">文件信息</param>
/// <param name="toUserName">发送人UserName</param>
public void SendMsgAsync(FileInfo fileInfo, string toUserName)

/// <summary>
/// 同步发送文件,自动分块上传,文件较大可能会卡住进程,建议异步发送
/// </summary>
/// <param name="fileInfo">文件信息</param>
/// <param name="toUserName">发送人UserName</param>
/// <returns></returns>
public SendMsgResponse SendMsg(FileInfo fileInfo, string toUserName)

/// <summary>
/// 获取头像,因为请求的时候需要带Cookie等相关参数,所以直接用新的http请求不行,务必使用客户端API来获取
/// </summary>
/// <param name="url">头像地址,例如/cgi-bin/mmwebwx-bin/webwxgeticon?seq=0&username=filehelper&[email protected]_372b266_540d016177e861740ee84fec697a3b01 </param>
/// <param name="action">委托Action</param>
/// <returns></returns>
public void GetIconAsync(string url, Action<Image> action)

/// <summary>
/// 同步上传文件
/// </summary>
/// <param name="fileInfo">文件信息</param>
/// <returns></returns>
public UploadMediaResponse UploadFile(FileInfo fileInfo)

/// <summary>
/// 同步修改备注
/// 注意:多次调用该接口会被封
/// </summary>
/// <param name="remarkName">需要修改的备注名</param>
/// <param name="userName">需要修改的联系人UserName</param>
/// <returns></returns>
public SimpleResponse RemarkName(string remarkName, string userName)

/// <summary>
/// 同步通过好友认证
/// </summary>
/// <param name="info">sync中获得的申请信息</param>
/// <returns></returns>
public SimpleResponse VerifyUser(RecommendInfo info)

/// <summary>
/// 同步顶置聊天
/// 注意:多次调用该接口会被封
/// </summary>
/// <param name="remarkName">备注名,官方接口同时附带这个参数,我们也带上吧</param>
/// <param name="userName">需要修改的联系人UserName</param>
/// <returns></returns>
public SimpleResponse TopContact(string remarkName, string userName)

/// <summary>
/// 同步取消顶置消息
/// </summary>
/// <param name="remarkName">备注名,官方接口同时附带这个参数,我们也带上吧</param>
/// <param name="userName">需要修改的联系人UserName</param>
/// <returns></returns>
public SimpleResponse UnTopContact(string remarkName, string userName)

/// <summary>
/// 群里移除用户,用IsOwner判断自己是不是群主,否则没有权限
/// </summary>
/// <param name="roomName"></param>
/// <param name="delName">用户UserName,英文,分割</param>
/// <returns></returns>
public UpdateChatRoomResponse RemoveChatRoomMember(string roomName, List<string> delNameList)

/// <summary>
/// 添加用户到群聊
/// </summary>
/// <param name="roomName">群UserName</param>
/// <param name="addName">用户UserName,英文,分割</param>
/// <returns></returns>
public UpdateChatRoomResponse AddChatRoomMember(string roomName, List<string> addNameList)

/// <summary>
/// 创建群,调用完成,可以用返回的信息,通过GetBatchGetContact去获取群信息
/// </summary>
/// <param name="memberList">UserName的list</param>
/// <returns></returns>
public CreateChatRoomResponse CreateChatRoom(List<MemberItem> memberList)

参考

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].