Académique Documents
Professionnel Documents
Culture Documents
Synchronizing Life
Microsoft Live
Search 2.0
Agenda Live Services
Synchronizing Life
• HTTP
– XML
– JSON
– Query parameters (AppID, query, sources)
• SOAP
• RSS
Live Search Sources Live Services
Synchronizing Life
Source Description
Web Searches for Web content
Image Searches for images on the web
News Searches news stories
Instantanswer Searches Microsoft Encarta online
Spell Searches Microsoft Encarta
dictionary
Phonebook Searches phonebook entries
relatedsearch Returns the query strings most
similar to yours
Getting an API key
Live Services
Synchronizing Life
• Go to http://search.live.com/
developers
• Sign in with your Windows Live ID
• Create a new AppID
Live Services
Synchronizing Life
Using HTTP
8
Typical HTTP Request Live Services
Synchronizing Life
http://api.search.live.net/xml.aspx?
Appid=<AppID>&query=sushi&source
s=web+image+news
• Specify XML or JSON
• Use your AppID
• Pass in the query text
• Specify the sources to search
That’s it!
Demo
Live Services
Synchronizing Life
Using .NET
14
XML API from .NET
Live Services
Synchronizing Life
string url =
"http://api.search.live.net/xml.aspx?
Appid={0}&sources={1}&query={2}";
JSON Query
18
Live Services
Synchronizing Life
ASP.NET Demo
21
Live Services
Synchronizing Life
Silverlight
Silverlight
Live Services
Synchronizing Life
WebClient callback
void wc_OpenReadCompleted(object sender,
OpenReadCompletedEventArgs e)
{
Stream streamResult = e.Result;
XDocument xd =
XDocument.Load(XmlReader.Create(streamResult));
// use the Xdocument
}
Demo
Live Services
Synchronizing Life
Silverlight
25
Live Services
Synchronizing Life
RSS
RSS Live Services
Synchronizing Life
Discussion
Live Services
Synchronizing Life
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or
other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to
changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date
of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.