コード例 #1
0
        public static async Task AsyncMain()
        {
            HttpClient httpClient = new HttpClient();

            // Initialize YoutubeClient
            YoutubeClient ytClient = new YoutubeClient(httpClient);

            // Search with maxResults 1 & with keywords "CHiCO Love Letter"
            List <YoutubeVideo> responseObject = await ytClient.Search("CHiCO Love Letter", maxResults : 1);

            foreach (YoutubeVideo video in responseObject)
            {
                Console.WriteLine(video.ToString());
                Console.WriteLine("");
            }
        }