public async Task<IPDetails> GetExternalApiDetails(string ip) { var uri = string.Format(_ipManagerConfig.ExternalApiUri, ip); var details = await _requestProvider.GetSingleItemRequest<IPDetails>(uri); var detailsDto = _mapper.Map<IPDetailsDto>(details); await _detailsRepository.InsertIPDetailsAsync(detailsDto); _cacheProvider.SetCache(ip,details); return details; }
public async Task <User> GetUserInfo(int id) { var uri = $"{Settings.ServerUrl}user/userinfo?id={id}"; return(await _requestprovider.GetSingleItemRequest <User>(uri)); }
public async Task <IPDetails> GetDetails(string ip) { var uri = String.Format(_ipManagerConfig.ExternalApiUri, ip); return(await _requestProvider.GetSingleItemRequest <IPDetails>(uri)); }