/// <summary> /// Get Information about user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userId'> /// Lykke user Id (won't be use for Chainalysis) /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> UserByUserIdGetGetAsync(this IChainalysisProxyAPI operations, string userId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UserByUserIdGetGetWithHttpMessagesAsync(userId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get User Score /// </summary> /// <param name="userId"></param> /// <returns></returns> public async Task <UserScoreDetails> GetUserScore(string userId) { var result = await _service.UserByUserIdGetGetWithHttpMessagesAsync(userId); if (result.Response.IsSuccessStatusCode) { return(Mapper.Map <UserScoreDetails>(result.Body)); } return(null); }
/// <summary> /// Get User Score /// </summary> /// <param name="userId"></param> /// <returns></returns> public async Task <UserScoreDetails> GetUserScore(string userId) { var task = _service.UserByUserIdGetGetWithHttpMessagesAsync(userId); var resTask = await TaskWithDelay(task); if (resTask != task) { _log.WriteWarning(nameof(ChainalysisProxyClient), nameof(GetUserScore), $"Timeout with {userId}"); return(null); } var result = task.Result; if (result.Response.IsSuccessStatusCode) { return(MapUserScoreDetails((IUserScoreDetails)result.Body)); } return(null); }