delete_tag 请求参数
服务端删除用户标签。 特别地,当user_id被提交时,服务端将只会完成解除该用户与tag绑定关系的操作。 注意:该操作不可恢复,请谨慎使用。
상속: ClientRequestBase
예제 #1
0
        public void DeleteTagTest()
        {
            var requestSet = new TagSetRequest
                (
                "TAG_TEST_DELETE"
                );

            Console.WriteLine("Set Tag:" + requestSet.Tag);

            var clientSet = new Client(_apiKey, _secretKey);
            var responseSet = clientSet.SetTag(requestSet);

            Assert.NotNull(responseSet);
            Assert.Greater(responseSet.RequestId, 0);

            var request = new TagDeleteRequest
                (
                "TAG_TEST_DELETE"
                );

            Console.WriteLine("Set Tag:" + requestSet.Tag);

            var client = new Client(_apiKey, _secretKey);
            var response = client.DeleteTag(request);

            Assert.NotNull(response);
            Assert.Greater(response.RequestId, 0);
        }
예제 #2
0
        /// <summary>
        /// delete_tag
        /// </summary>
        /// <param name="request">set tag request parameter</param>
        /// <returns></returns>
        public TagDeleteResponse DeleteTag(TagDeleteRequest request)
        {
            var postStr = request.GeneratePostData(Apikey, SecretKey);

            var response = PostData(request.ServiceUrl, postStr);
            if (response == null)
                return null;

            TagDeleteResponse result = null;
            try
            {
                result = JsonConvert.DeserializeObject<TagDeleteResponse>(response);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("DeleteTag Error Response Deserialize Fail, May not valid json:" + ex.Message + " " + response);
            }
            return result;
        }