public GetBindDeviceResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/device/get_bind_device?access_token=" + token.Token + "&openid=" + openid; return(send(url)); }
public CustomerResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + token.Token; return(send(url)); }
public UserTagIDResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/tags/getidlist?access_token=" + token.Token; return(send(url)); }
public VerifyQRCodeResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/device/verify_qrcode?access_token=" + token.Token; return(send(url)); }
public GetStatResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/device/get_stat?access_token=" + token.Token + "&device_id=" + device_id; return(send(url)); }
public CompelBindResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/device/compel_bind?access_token=" + token.Token; return(send(url)); }
public GetOpenidIDResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/device/get_openid?access_token=" + token.Token + "&device_type=" + device_type + "&device_id=" + device_id; return(send(url)); }
public TransMsgResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/device/transmsg?access_token=" + token.Token; return(send(url)); }
public CreateResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=" + token.Token; return(send(url)); }
public TagMembersBatchResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/tags/members/batchtagging?access_token=" + token.Token; return(send(url)); }
public UserInfoBatchResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=" + token.Token; return(send(url)); }
public TagUserResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/user/tag/get?access_token=" + token.Token; return(send(url)); }
public DeleteResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=" + token.Token; string sb = BaseClass.BaseMethod.WebRequestGet(url, Encoding.UTF8); return(Newtonsoft.Json.JsonConvert.DeserializeObject <DeleteResponse>(sb)); }
public UploadResponse send() { HightToken token = new HightToken(c); string posturl = "https://api.weixin.qq.com/shakearound/material/add?access_token=" + token.Token; string sb = BaseClass.BaseMethod.UploadFileByWebClient(posturl, filename); return(Newtonsoft.Json.JsonConvert.DeserializeObject <UploadResponse>(sb)); }
public GetResponse send() { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token=" + token.Token; string sb = BaseClass.BaseMethod.WebRequestGet(url, Encoding.UTF8); var res = Newtonsoft.Json.JsonConvert.DeserializeObject <GetResponse>(sb); return(res); }
public UserResponse send() { string url = ""; if (string.IsNullOrWhiteSpace(this.Access_token)) { HightToken token = new HightToken(c); url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=" + token.Token + "&openid=" + openid + "&lang=zh_CN"; //关注 } else { url = "https://api.weixin.qq.com/sns/userinfo?access_token=" + Access_token + "&openid=" + openid + "&lang=zh_CN"; //拉伸 } return(send(url)); }
/// <summary> /// 拉取用户信息(需用户关注) /// </summary> /// <param name="c"></param> /// <param name="openid"></param> /// <returns></returns> public static User GetUserInfo(Config c, string openid) { HightToken token = new HightToken(c); string url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=" + token.Token + "&openid=" + openid + "&lang=zh_CN"; string sb = BaseClass.BaseMethod.WebRequestGet(url, Encoding.UTF8); JObject json = JObject.Parse(sb); if (json["errcode"] != null) { return(new User()); } else { var u = Newtonsoft.Json.JsonConvert.DeserializeObject <User>(sb); return(u); } }