Ejemplo n.º 1
0
        /// <summary>
        /// Download all the starships from the API
        /// </summary>
        /// <returns></returns>
        private async Task <List <Starship> > DownloadStarships()
        {
            _logger.Message("Downloading starships from API..");
            List <Starship> _starships = await _download.GetStarships();

            if (_starships == null || _starships.Count == 0)
            {
                _logger.Error("Was not possible to get the starthips from the API.");
            }
            else
            {
                _logger.Message($"Found {_starships.Count} starships");
            }

            return(_starships);
        }