Ejemplo n.º 1
0
        public ListResponse <User> GetUsers()
        {
            var request = GenerateDefaultRequest();

            request.Resource += $"users/{TcaClient.GetTokenUserId()}";
            return(ExecuteListResponseRequest <User>(request));
        }
Ejemplo n.º 2
0
 public User GetMe()
 {
     try
     {
         var request = GenerateDefaultRequest();
         request.Resource += "me";
         return(ExecuteBaseResponseRequest <User>(request).Result);
     }
     catch (ApiResponseException e)
     {
         if (e.ErrorResponse.RestResponse.StatusCode == HttpStatusCode.NotFound)
         {
             throw new NotFoundException(typeof(User), e, new [] { TcaClient.GetTokenUserId() });
         }
         throw;
     }
 }