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); }
/// <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; }