hello everyone i want to intregate yahoo search api in my web application in asp.net with c#. i don't know how to call yahoo api. pls tell me with code.
A:
I'm not sure if it still works, but I wrote a C# & VB.Net wrapper for this some years ago. Yahoo even included it in their sample code. You can download it from my site. Basically you use XSD.Exe on the XML schema that you get from Yahoo's developer web site and then desearialize the result of your web request into the objects XSD.exe produces.
Martin Brown
2009-02-02 14:56:03
+1
A:
string AppId = "foo";
string Query = "stackoverflow";
int NumResults = 10;
WebClient webClient = new WebClient();
string request = string.Format(
"http://search.yahooapis.com/WebSearchService/V1/webSearch?appid={0}&query={1}&results={2}"
, AppId
, Query
, NumResults);
byte[] response = webClient.DownloadData(request);
string responseXML = System.Text.UTF8Encoding.UTF8.GetString(response);
Console.WriteLine(responseXML);
xcud
2009-02-07 22:22:47