Пример #1
0
        public static string GetMaterialList(string access_token, string postdata)
        {
            string url = string.Format("https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token={0}", access_token);

            string result = WechatHttpWebResponseUtility.PostJsonData(url, postdata);

            return(result);
        }
Пример #2
0
        public static string SendTempletMessge(string access_token, string postdata)
        {
            string url = string.Format("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={0}", access_token);

            string result = WechatHttpWebResponseUtility.PostJsonData(url, postdata);

            return(result);
        }
Пример #3
0
        public static string CreateMenu(string access_token, string postdata)
        {
            string url = string.Format("https://api.weixin.qq.com/cgi-bin/menu/create?access_token={0}", access_token);

            string result = WechatHttpWebResponseUtility.PostJsonData(url, postdata);

            return(result);
        }
Пример #4
0
        public static string wechatApi(string operate, string access_token, string postdata)
        {
            string result = "";
            string url    = "";

            switch (operate)
            {
            case "SendTemplateMessage":
                url = string.Format("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={0}", access_token);
                break;

            case "GetUserListInfo":
                url = string.Format("https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token={0}", access_token);
                break;
            }
            result = WechatHttpWebResponseUtility.PostJsonData(url, postdata);
            return(result);
        }