Exemple #1
0
        public async Task <IEnumerable <Property> > GetProperties()
        {
            var settingsContainer = await _settingsReader.ReadSettings("providers/Immobilienscout24.yml");

            var optionToUse = GetOptionsToUse(settingsContainer.Settings.ToList());
            var result      = await _webClient.GetObjects(optionToUse.options, optionToUse.page);

            _optionsToLastPageDictionary[optionToUse.options] = result.NextPageNumber;
            _lastUsedOptions = optionToUse.options;

            _logger.LogInfo($"Found {result.ImmoscoutProperties.Count()} properties");

            return(_immoscoutConverter.ToProperties(result.ImmoscoutProperties));
        }
Exemple #2
0
        public async Task <IEnumerable <Property> > GetProperties()
        {
            var settingsContainer = await _settingsReader.ReadSettings("providers/KSK.yml");

            var properties = new List <Property>();

            foreach (var setting in settingsContainer.Settings)
            {
                var kskProperties = await _webClient.GetObjects(setting);

                properties.AddRange(_kskEstateConverter.ToProperties(kskProperties));
            }

            _logger.LogInfo($"Found {properties.Count} properties");

            return(properties);
        }