Пример #1
0
 public NotificationRepository(HttpClient httpClient, IOptions <APIUrls> apiUrls, ILogger <NotificationRepository> logger)
 {
     _httpClient = httpClient;
     _apiUrls    = apiUrls.Value;
     URLConfig.Promotion.BaseURI = _apiUrls.PromotionAPI_Base;
     _logger = logger;
 }
 public RecommendationService(HttpClient serviceClient, IOptions <APIUrls> apiUrls)
 {
     _apiClient = serviceClient;
     _apiUrls   = apiUrls.Value;
     URLConfig.Recommendation.BaseURI = _apiUrls.RecommendationAPI_Base;
     URLConfig.Claim.BaseURI          = _apiUrls.ClaimAPI_Base;
 }
Пример #3
0
 public ClaimRepository(MyDBContext context, HttpClient httpClient, IOptions <APIUrls> apiUrls, ILogger <ClaimRepository> logger)
 {
     _context                    = context;
     _httpClient                 = httpClient;
     _apiUrls                    = apiUrls.Value;
     URLConfig.Login.BaseURI     = _apiUrls.LoginAPI_Base;
     URLConfig.Promotion.BaseURI = _apiUrls.PromotionAPI_Base;
     _logger = logger;
 }
Пример #4
0
 public ClaimService(HttpClient httpClient, IOptions <APIUrls> apiUrls, ILogger <ClaimService> logger)
 {
     _httpClient                   = httpClient;
     _apiUrls                      = apiUrls.Value;
     _logger                       = logger;
     URLConfig.Claim.BaseURI       = _apiUrls.ClaimAPI_Base;
     URLConfig.Promotion.BaseURI   = _apiUrls.PromotionAPI_Base;
     URLConfig.ShopProfile.BaseURI = _apiUrls.ShopProfileAPI_Base;
 }
Пример #5
0
 public ApiService(
     ILogger <ApiService> logger,
     IServiceScopeFactory scopeFactory,
     IOptions <APIUrls> urls)
 {
     _logger       = logger;
     _scopeFactory = scopeFactory;
     _aQ           = new AQICN();
     _urls         = urls.Value;
 }
Пример #6
0
        // convert UAH to Bitcoin by todays exchange rate
        public decimal ConvertUAHToBitcoin(decimal moneyInUAH)
        {
            var rate = Task.Run(() => _bitcoinConverter.GetAsync <BitcoinToUAHRateResponse>(APIUrls.GetBitcoinToUAHRateAPI())).GetAwaiter().GetResult();

            return(moneyInUAH / Convert.ToDecimal(rate.data.rate));
        }
 public NotificationService(HttpClient httpClient, IOptions <APIUrls> apiUrls)
 {
     _httpClient = httpClient;
     _apiUrls    = apiUrls.Value;
     URLConfig.Notification.BaseURI = _apiUrls.NotificationAPI_Base;
 }
Пример #8
0
 public static async Task <List <CovidTimeStep> > GetCountryDailyDataByStatus(string country, string status)
 {
     return(await GetCountryDailyDataByStatus(APIUrls.GetCountryDailyCases().Replace("*", country).Replace("#", status)));
 }
Пример #9
0
 public FeedbackService(HttpClient serviceClient, IOptions <APIUrls> apiUrls)
 {
     _apiClient = serviceClient;
     _apiUrls   = apiUrls.Value;
     URLConfig.Feedback.BaseURI = _apiUrls.FeedbackAPI_Base;
 }
Пример #10
0
 public CustomerProfileService(HttpClient serviceClient, IOptions <APIUrls> apiUrls)
 {
     _apiClient = serviceClient;
     _apiUrls   = apiUrls.Value;
     URLConfig.CustomerProfile.BaseURI = _apiUrls.CustomerProfileAPI_Base;
 }
Пример #11
0
 public LoginService(HttpClient httpClient, IOptions <APIUrls> apiUrls, IShopProfileService shopProfileService)
 {
     _httpClient             = httpClient;
     _apiUrls                = apiUrls.Value;
     URLConfig.Login.BaseURI = _apiUrls.LoginAPI_Base;
 }
Пример #12
0
 public ShopProfileService(HttpClient httpClient, IOptions <APIUrls> apiUrls)
 {
     _httpClient = httpClient;
     _apiUrls    = apiUrls.Value;
     URLConfig.ShopProfile.BaseURI = _apiUrls.ShopProfileAPI_Base;
 }