当前位置: 首页>>代码示例>>C#>>正文


C# Weixin.Entities类代码示例

本文整理汇总了C#中Senparc.Weixin.Entities的典型用法代码示例。如果您正苦于以下问题:C# Senparc.Weixin.Entities类的具体用法?C# Senparc.Weixin.Entities怎么用?C# Senparc.Weixin.Entities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Senparc.Weixin.Entities类属于命名空间,在下文中一共展示了Senparc.Weixin.Entities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetId

        /// <summary>
        /// 获取用户分组
        /// </summary>
        /// <param name="accessTokenOrAppId"></param>
        /// <param name="openId"></param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static GetGroupIdResult GetId(string accessTokenOrAppId, string openId, int timeOut = Config.TIME_OUT)
        {
            return ApiHandlerWapper.TryCommonApi(accessToken =>
            {
                var urlFormat = "https://api.weixin.qq.com/cgi-bin/groups/getid?access_token={0}";
                var data = new { openid = openId };
                return CommonJsonSend.Send<GetGroupIdResult>(accessToken, urlFormat, data, timeOut: timeOut);

            }, accessTokenOrAppId);
        }
开发者ID:d18zj,项目名称:WeiXinMPSDK,代码行数:17,代码来源:GroupsAPI.cs

示例2: DeleteExpress

        /// <summary>
        ///     删除邮费模板
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="templateId">邮费模板Id</param>
        /// <returns></returns>
        public static WxJsonResult DeleteExpress(string accessToken, int templateId)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/express/del?access_token={0}";

            var data = new
            {
                template_id = templateId
            };

            return CommonJsonSend.Send<WxJsonResult>(accessToken, urlFormat, data);
        }
开发者ID:Chinaccn,项目名称:surfboard,代码行数:17,代码来源:ExpressApi.cs

示例3: BatchDeleteMember

        /// <summary>
        ///     批量删除成员
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="userIds"></param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static QyJsonResult BatchDeleteMember(string accessToken, string[] userIds, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/user/batchdelete?access_token={0}", accessToken);

            var data = new
            {
                useridlist = userIds
            };

            return CommonJsonSend.Send<QyJsonResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:Chinaccn,项目名称:surfboard,代码行数:18,代码来源:MailListApi.cs

示例4: DeleteShelves

        /// <summary>
        /// 删除货架
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="shelfId">货架Id</param>
        /// <returns></returns>
        public static WxJsonResult DeleteShelves(string accessToken, int shelfId)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/shelf/del?access_token={0}";

            var data = new
            {
                shelf_id = shelfId
            };

            return CommonJsonSend.Send<WxJsonResult>(accessToken, urlFormat, data);
        }
开发者ID:cnand0ng,项目名称:WeiXinMPSDK,代码行数:17,代码来源:ShelfApi.cs

示例5: GetByIdExpress

        /// <summary>
        ///     获取指定ID的邮费模板
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="templateId">邮费模板Id</param>
        /// <returns></returns>
        public static GetByIdExpressResult GetByIdExpress(string accessToken, int templateId)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/express/getbyid?access_token={0}";

            var data = new
            {
                template_id = templateId
            };

            return CommonJsonSend.Send<GetByIdExpressResult>(accessToken, urlFormat, data);
        }
开发者ID:Chinaccn,项目名称:surfboard,代码行数:17,代码来源:ExpressApi.cs

示例6: DeleteProduct

        /// <summary>
        ///     删除商品
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="productId">商品的Id</param>
        /// <returns></returns>
        public static WxJsonResult DeleteProduct(string accessToken, string productId)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/del?access_token={0}";

            var data = new
            {
                product_id = productId
            };

            return CommonJsonSend.Send<WxJsonResult>(accessToken, urlFormat, data);
        }
开发者ID:timxing1987,项目名称:git-tutorial,代码行数:17,代码来源:ProductApi.cs

示例7: GetByIdGroup

        /// <summary>
        ///     根据分组ID获取分组信息
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="groupId">分组Id</param>
        /// <returns></returns>
        public static GetByIdGroup GetByIdGroup(string accessToken, int groupId)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/group/getbyid?access_token={0}";

            var data = new
            {
                group_id = groupId
            };

            return CommonJsonSend.Send<GetByIdGroup>(accessToken, urlFormat, data);
        }
开发者ID:timxing1987,项目名称:git-tutorial,代码行数:17,代码来源:GroupApi.cs

示例8: DeleteGroup

        /// <summary>
        /// 删除分组
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="groupId">分组Id</param>
        /// <returns></returns>
        public static WxJsonResult DeleteGroup(string accessToken, int groupId)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/group/del?access_token={0}";

            var data = new
            {
                group_id = groupId
            };

            return CommonJsonSend.Send<WxJsonResult>(accessToken, urlFormat, data);
        }
开发者ID:cnand0ng,项目名称:WeiXinMPSDK,代码行数:17,代码来源:GroupApi.cs

示例9: GetByStatus

        /// <summary>
        ///     获取指定状态的所有商品
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="status">商品状态(0-全部, 1-上架, 2-下架)</param>
        /// <returns></returns>
        public static GetByStatusResult GetByStatus(string accessToken, int status)
        {
            var urlFormat = "https://api.weixin.qq.com/merchant/getbystatus?access_token={0}";

            var data = new
            {
                status
            };

            return CommonJsonSend.Send<GetByStatusResult>(accessToken, urlFormat, data);
        }
开发者ID:timxing1987,项目名称:git-tutorial,代码行数:17,代码来源:ProductApi.cs

示例10: GetPreAuthCode

        /// <summary>
        /// 获取预授权码
        /// </summary>
        /// <param name="suiteAccessToken"></param>
        /// <param name="suiteId">应用套件id</param>
        /// <param name="appId">应用id,本参数选填,表示用户能对本套件内的哪些应用授权,不填时默认用户有全部授权权限</param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static GetPreAuthCodeResult GetPreAuthCode(string suiteAccessToken, string suiteId, int[] appId, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/service/get_pre_auth_code?suite_access_token={0}", suiteAccessToken);

            var data = new
                {
                    suite_id = suiteId,
                    appid = appId
                };

            return CommonJsonSend.Send<GetPreAuthCodeResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:cnand0ng,项目名称:WeiXinMPSDK,代码行数:20,代码来源:ThirdPartyAuthApi.cs

示例11: GetSuiteToken

        /// <summary>
        /// 获取应用套件令牌
        /// </summary>
        /// <param name="suiteId">应用套件id</param>
        /// <param name="suiteSecret">应用套件secret</param>
        /// <param name="suiteTicket">微信后台推送的ticket</param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static GetSuiteTokenResult GetSuiteToken(string suiteId, string suiteSecret, string suiteTicket, int timeOut = Config.TIME_OUT)
        {
            var url = "https://qyapi.weixin.qq.com/cgi-bin/service/get_suite_token";

            var data = new
                {
                    suite_id = suiteId,
                    suite_secret = suiteSecret,
                    suite_ticket = suiteTicket
                };

            return CommonJsonSend.Send<GetSuiteTokenResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:cnand0ng,项目名称:WeiXinMPSDK,代码行数:21,代码来源:ThirdPartyAuthApi.cs

示例12: GetComponentAccessToken

        /// <summary>
        /// 获取第三方平台access_token
        /// </summary>
        /// <param name="componentAppId">第三方平台appid</param>
        /// <param name="componentAppSecret">第三方平台appsecret</param>
        /// <param name="componentVerifyTicket">微信后台推送的ticket,此ticket会定时推送,具体请见本页末尾的推送说明</param>
        /// <param name="timeOut"></param>
        /// <returns></returns>
        public static ComponentAccessTokenResult GetComponentAccessToken(string componentAppId, string componentAppSecret, string componentVerifyTicket, int timeOut = Config.TIME_OUT)
        {
            var url = "https://api.weixin.qq.com/cgi-bin/component/api_component_token";

            var data = new
            {
                component_appid = componentAppId,
                component_appsecret = componentAppSecret,
                component_verify_ticket = componentVerifyTicket
            };

            return CommonJsonSend.Send<ComponentAccessTokenResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:cnand0ng,项目名称:WeiXinMPSDK,代码行数:21,代码来源:ComponentApi.cs

示例13: AddTagMember

        /// <summary>
        /// 增加标签成员
        /// </summary>
        /// <param name="accessToken">调用接口凭证</param>
        /// <param name="tagId">标签ID</param>
        /// <param name="userList">企业成员ID列表,注意:userlist、partylist不能同时为空</param>
        /// <param name="partyList">企业部门ID列表,注意:userlist、partylist不能同时为空</param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static AddTagMemberResult AddTagMember(string accessToken, int tagId, string[] userList = null, int[] partyList = null, int timeOut = Config.TIME_OUT)
        {
            var url = "https://qyapi.weixin.qq.com/cgi-bin/tag/addtagusers?access_token={0}";

            var data = new
            {
                tagid = tagId,
                userlist = userList,
                partylist = partyList
            };

            return CommonJsonSend.Send<AddTagMemberResult>(accessToken, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:CurryHan,项目名称:WeiXinMPSDK,代码行数:22,代码来源:MailListApi.cs

示例14: GetAuthInfo

        /// <summary>
        /// 获取企业号的授权信息
        /// </summary>
        /// <param name="suiteAccessToken"></param>
        /// <param name="suiteId">应用套件id</param>
        /// <param name="authCorpId">授权方corpid</param>
        /// <param name="permanentCode">永久授权码,通过get_permanent_code获取</param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static GetAuthInfoResult GetAuthInfo(string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/service/get_auth_info?suite_access_token={0}", suiteAccessToken);

            var data = new
            {
                suite_id = suiteId,
                auth_corpid = authCorpId,
                permanent_code = permanentCode
            };

            return CommonJsonSend.Send<GetAuthInfoResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:d18zj,项目名称:WeiXinMPSDK,代码行数:22,代码来源:ThirdPartyAuthApi.cs

示例15: UpdateDepartment

        /// <summary>
        /// 更新部门
        /// </summary>
        /// <param name="accessToken">调用接口凭证</param>
        /// <param name="id">部门id</param>
        /// <param name="name">更新的部门名称。长度限制为0~64个字符。修改部门名称时指定该参数</param>
        /// <param name="parentId">父亲部门id。根部门id为1 </param>
        /// <param name="order">在父部门中的次序。从1开始,数字越大排序越靠后</param>
        /// <param name="timeOut">代理请求超时时间(毫秒)</param>
        /// <returns></returns>
        public static QyJsonResult UpdateDepartment(string accessToken, string id, string name, int parentId, int order = 1, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/department/update?access_token={0}", accessToken);

            var data = new
            {
                id = id,
                name = name,
                parentid = parentId,
                order = order
            };

            return CommonJsonSend.Send<QyJsonResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }
开发者ID:cnand0ng,项目名称:WeiXinMPSDK,代码行数:24,代码来源:MailListApi.cs


注:本文中的Senparc.Weixin.Entities类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。