Esempio n. 1
0
        async Task <AddTagResult> IUserComCustomIdUsersClient.AddTagAsync(string userId, string tagName)
        {
            var response = await SendAsync <dynamic, dynamic>(HttpMethod.Post, $"{CUSTOMIDUSER_RESOURCE}/{userId}/add_tag/", new { name = tagName });

            var result = new AddTagResult
            {
                Created = response.created,
                TagName = response.tag.name
            };

            return(result);
        }
        async Task <AddTagResult> IUserComCustomIdCrmClient.AddCompanyTagAsync(string companyId, string name)
        {
            var response = await SendAsync <dynamic, dynamic>(HttpMethod.Post, $"{CUSTOMIDCOMPANY_RESOURCE}/{companyId}/add_tag/", new { name });

            var result = new AddTagResult
            {
                Created = response.created,
                TagName = response.tag.name
            };

            return(result);
        }