コード例 #1
0
 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;
 }
コード例 #2
0
        public async Task <User> GetUserInfo(int id)
        {
            var uri = $"{Settings.ServerUrl}user/userinfo?id={id}";

            return(await _requestprovider.GetSingleItemRequest <User>(uri));
        }
コード例 #3
0
        public async Task <IPDetails> GetDetails(string ip)
        {
            var uri = String.Format(_ipManagerConfig.ExternalApiUri, ip);

            return(await _requestProvider.GetSingleItemRequest <IPDetails>(uri));
        }