Example #1
0
        public static void Test()
        {
            YahooSearchService yahoo = new YahooSearchService();

            Yahoo.API.ImageSearchResponse.ResultSet resultSet = yahoo.ImageSearch("YahooExample", "satriani", "all", 10, 1, "any", true);

            StringWriter sw = new StringWriter();
            foreach (Yahoo.API.ImageSearchResponse.ResultType result in resultSet.Result)
            {
                System.Diagnostics.Debug.WriteLine("Title: {0}", result.Title);
                System.Diagnostics.Debug.WriteLine("Summary: {0}", result.Summary);
                System.Diagnostics.Debug.WriteLine("URL: {0}", result.Url);
                System.Diagnostics.Debug.WriteLine("==============================================================");
            }
        }
Example #2
0
        private void btnImage_Click(object sender, System.EventArgs e)
        {
            YahooSearchService yahoo = new YahooSearchService();

            Yahoo.API.ImageSearchResponse.ResultSet resultSet = yahoo.ImageSearch("YahooExample", "maddona", "all", 10, 1, "any", true );

            StringWriter sw = new StringWriter();
            foreach (Yahoo.API.ImageSearchResponse.ResultType result in resultSet.Result)
            {
                sw.WriteLine("Title: {0}", result.Title);
                sw.WriteLine("Summary: {0}", result.Summary);
                sw.WriteLine("URL: {0}", result.Url);
                sw.WriteLine("===============================================================");
            }

            txtResult.Text = sw.ToString();
        }