Ejemplo n.º 1
0
        public void QueryUserTagsTest()
        {
            var request = new UserTagQueryRequest("945124040446040348");

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

            Assert.NotNull(response);
            Assert.Greater(response.RequestId, 0);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// query_user_tags
        /// </summary>
        /// <param name="request">set tag request parameter</param>
        /// <returns></returns>
        public UserTagQueryResponse QueryUserTags(UserTagQueryRequest request)
        {
            var postStr = request.GeneratePostData(Apikey, SecretKey);

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

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