コード例 #1
0
            // ? RemoveUdfValue 方法却使用了 UdvParam 这合理吗?
            public async Task <CommonMessage> RemoveUdfValue(string userId, string key, CancellationToken cancellation = default)
            {
                var param = new RemoveUdvParam(UdfTargetType.USER, userId, key);
                var res   = await client.Request <SetUdfValueBatchResponse>(param.CreateRequest(), cancellation);

                return(res.Result);
            }
コード例 #2
0
            public async void RemoveUdfValue(string roleId, string key, CancellationToken cancellationToken = default)
            {
                var param = new RemoveUdvParam(UdfTargetType.ROLE, roleId, key);
                var res   = await client.Request <RemoveUdvResponse>(param.CreateRequest(), cancellationToken);

                // TODO: 缺少返回值
            }
コード例 #3
0
        /// <summary>
        /// 移除用户自定义字段的值
        /// </summary>
        /// <param name="key"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task <IEnumerable <UserDefinedData> > RemoveUdv(
            string key,
            CancellationToken cancellationToken = default)
        {
            await CheckLoggedIn();

            var param = new RemoveUdvParam(UdfTargetType.USER, User.Id, key);
            var res   = await Request <RemoveUdvResponse>(param.CreateRequest(), cancellationToken);

            return(res.Result);
        }
コード例 #4
0
            /// <summary>
            /// 移除用户自定义字段的值
            /// </summary>
            /// <param name="userId"></param>
            /// <param name="key"></param>
            /// <param name="cancellationToken"></param>
            /// <returns></returns>
            public async Task <IEnumerable <UserDefinedData> > RemoveUdv(
                string userId,
                string key,
                CancellationToken cancellationToken = default)
            {
                var param = new RemoveUdvParam(UdfTargetType.USER, userId, key);
                await client.GetAccessToken();

                var res = await client.Request <RemoveUdvResponse>(param.CreateRequest(), cancellationToken);

                return(res.Result);
            }