static async Task <bool> StartApodAsync(string apiKey, int resultCount)
        {
            var apodClient   = new ApodClient(apiKey);
            var mediaOfToday = await apodClient.GetAsync(resultCount);

            if (mediaOfToday != null)
            {
                DisplayMedia(mediaOfToday);
                return(false);
            }
            return(true);
        }
        public static async Task Main(string[] args)
        {
            CultureInfo.CurrentCulture = new CultureInfo("en-GB", false);

            try
            {
                if (args.Length < 1 || (args[0] != "apod" && args[0] != "neows"))
                {
                    ThrowOnInvalidInput();
                }

                _config = new ConfigurationBuilder()
                          .AddJsonFile(ConfigFile)
                          .Build();
                string apiKey = _config["ApiKey"];

                if (args[0] == "apod")
                {
                    if (args.Length < 2)
                    {
                        ThrowOnInvalidInput();
                    }
                    if (!int.TryParse(args[1], out int count))
                    {
                        ThrowOnInvalidInput();
                    }
                    var            nasaClient = new ApodClient(apiKey);
                    MediaOfToday[] res        = await nasaClient.GetAsync(count);

                    foreach (MediaOfToday media in res)
                    {
                        Console.WriteLine($"{media}{Environment.NewLine}");
                    }
                }
                else
                {
                    string startDate = _config["NeoWs:StartDate"];
                    string endDate   = _config["NeoWs:EndDate"];

                    AsteroidRequest request;
                    if (args.Length < 2 || !int.TryParse(args[1], out int count))
                    {
                        request = new AsteroidRequest(startDate, endDate);
                    }
                    else
                    {
                        request = new AsteroidRequest(startDate, endDate, count);
                    }

                    var nasaClient       = new NeoWsClient(apiKey);
                    AsteroidLookup[] res = await nasaClient.GetAsync(request);

                    foreach (AsteroidLookup asteroid in res)
                    {
                        Console.WriteLine($"- {asteroid}{Environment.NewLine}");
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }