コード例 #1
0
ファイル: Program.cs プロジェクト: Nplu5/OpenWeatherLib
        static async Task Main(string[] args)
        {
            var openWeatherService = OpenWeatherService.CreateOpenWeatherService(Secrets.OpenWeatherApiKey);
            var query = new OpenWeatherQuery(
                "Karlsruhe,de",
                new OpenWeatherDaySpecification(RelativeDay.NextDay, DateTime.Today)
                );
            var matches = await openWeatherService.GetForecasts(query).ConfigureAwait(false);

            foreach (var match in matches)
            {
                Console.WriteLine(match.ToString());
            }
        }