1 / 26

Yahoo! Web Services

Yahoo! Web Services Dan Theurer dan@yahoo-inc.com January 10, 2005 Coming up… The Yahoo! Developer Network Web services overview Current state of Yahoo! Web services Code Samples Questions Developer Network

Antony
Télécharger la présentation

Yahoo! Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Yahoo! Web Services Dan Theurer dan@yahoo-inc.com January 10, 2005

  2. Coming up… • The Yahoo! Developer Network • Web services overview • Current state of Yahoo! Web services • Code Samples • Questions

  3. Developer Network • Yahoo! provides a number of useful and free Web services that you can use in your applications and Web sites today • First Services on developer.yahoo.net launched in March 2005. All were search related (video, web, local, news and image) • In April we started building a dedicated team to co-ordinate and support efforts for publicly available Web services within Yahoo! Currently there are 6 people on the team and we are still growing • We have a pretty busy launch calendar for the next couple of month and what we offer today is just the tip of the iceberg

  4. Why Web Services • Extend the reach of Yahoo! properties • Beyond the browser: mobile, desktop, etc. • Enable combinations of properties (Flickr images on Maps! Movie listings with restaurant reviews! Travel, Local Search and Traffic…) • Enable users to use Yahoo! data in their own way • We devote resources to making the “greatest good for the greatest number” happen • But we also recognize that today’s marginal use case can become tomorrow’s mainstream behavior • Enabling users of Yahoo! to create applications themselves is an important way to make this happen

  5. Technical Details • We offer several styles of APIs • Most are REST / yREST / RESTful or RSS return XML or JSON • SOAP is on the Roadmap. Flickr offers SOAP today • JavaScript / ActionScript APIs for Maps • HTTP GET or POST that return HTML -> old Maps • No lengthy sign-up process or fees (if you have a Y! ID you’re pretty much good to go) • Most calls take an application ID (which is used solely to help you determine how popular your app is) • Rate-limiting is done per IP address (not per app ID) • Most of the applications are Web based, and is limited per server. For client application or ones that use JSON rate limiting is therefore done per user. • Some APIs (Simple Maps API, RSS feeds, others) have no rate limits • Limits are noted on the documentation pages (developer.yahoo.net)

  6. Shopping Comparison shopping Search APIs Web Search News, Local Audio, Image, Video Content Analysis My Web (bookmarks + tags + FOAF) Travel Trip planer FairChase Upcoming.org Community-driven calendar Y! Widgets Desktop helper applications Many more to come… Web Services We Provide Today • del.ico.us • Social bookmarking • Flickr • Best way to store, sort, search and share your photos online. • Maps • 5 different technologies supported • Embed maps • Geocoding, Traffic Overlay • Music • Customize YME with plug-ins or skins • Webjay - publish web playlists. • RSS Feeds • Search Marketing • Advertiser Web Services

  7. Flash Friendly • Yahoo! opened up most of their APIs for Flash developers. About 130 REST calls and we will add more in the future. • API’s <cross-domain-policy> <allow-access-from domain="*"/></cross-domain-policy>

  8. Yahoo! Search APIs • Search API was the first Yahoo! Web service and we are constantly adding new calls • Use Y! Search in your web site / client applications (JSON) • Offers all the advanced search options that are available on the web site. The major advantage of an API is that you can use those services more efficiently. Make more out of Advanced Web Search. • What is possible…? • Local Search – Maps Mash-up • Vertical search (e.g. Web / News) • Content analysis – Term extraction spiffYSearch

  9. Example: Context Analysis API Only takes 3 parameters: • appid • query • context appid: “YahooDemo” context: “Labor Day on the Empire State Building” query: “vacation” (optional) Call: http://api.search.yahoo.com/ContentAnalysisService/V1/termExtraction?appid=YahooDemo&query=vacation&context=Labor%20Day%20on%20the%20Empire%20State%20Building

  10. Context Analysis XML Result <?xml version="1.0" encoding="UTF-8"?> • <ResultSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" • xmlns="urn:yahoo:cate" xsi:schemaLocation="urn:yahoo:cate http://api.search.yahoo.com/ContentAnalysisService/V1/TermExtractionResponse.xsd"> • <Result>empire state building</Result> • <Result>labor day</Result> • <Result>empire</Result> • <Result>state</Result> • <Result>empire state</Result> • <Result>state building</Result> • </ResultSet>

  11. Travel API • Want to get away…? • The Yahoo! Travel web services enables you to build applications that use the trip plan data from the Yahoo! Travel Trip Planner (http://travel.yahoo.com/trip). • The APIs support JSON as a alternative output method. This allows Web service requests to be made within a browser without the need of a proxy. • Currently all Travel services are read-only, but they have big plans for future APIs • The pattern for this API is identical to our other APIs (Search, Shopping)

  12. Yahoo! Shopping API • Retrieve comparison shopping data from our database of millions of products and thousands of merchants • Search inventory of all merchants or from a single, specific merchant • Shopping is constantly adding new calls. The latest additions allow you to get user reviews for a product and product specifications. • The pattern for this API is identical to our other APIs (Search, Travel)

  13. The completely new Maps API • 5 different technologies to work with Yahoo! Maps • AJAX API • Flash APIs • JavaScript • ActionScript (Flash IDE) • Flex • Simple API • Maps RESTy APIs

  14. Maps AJAX APIs • The Yahoo! AJAX Maps API lets developers add maps to their web sites using DHTML and JavaScript. • Maps are fully embeddable and scriptable using the JavaScript programming language. • Offered features • Pan • Zoom • Markers • Smart Windows • Event handling • It’s today’s way of interacting with embeddable maps EventBrowser

  15. Maps Flash APIs • Even richer user experience and set of functionality than the AJAX API • JavaScript for Flash • You can interact with a Flash Map using common JavaScript to leverage a rich Maps experience • ActionScipt for Flash • Build your application in the Flash IDE • Flex • Flex developers can use the Flex API with Presentation Server Technology to create powerful applications. • Overlays • Traffic Overlay • Local Search Overlay (only a couple lines of code) Local Overlay

  16. Simple Maps API • Perfect for store locators, plotting your road trip and/or crime spree, etc. • Overlay data is in geoRSS format • Add latitude/longitude or address/city/state/zip data to a normal RSS feed • RSS feed can reside on a server you own or you can POST the RSS data to us • No rate limits for this API! • Excel tool that let’s you generate the GeoRSS

  17. Maps REST APIs • Geocoding API – Pass in location data by address and receive geocoded (encoded with latitude-longitude) responses. • Map Image API - Stitch map images together to build your own maps for usage in custom applications, including mobile and offline use. mapImage • Traffic API - Build applications that take dynamic traffic report data to help you plan optimal routes and keep on top of your commute • Local Search API - Query against the Yahoo! Local service, which now returns longitude-latitude with every search result for easy plotting on a map. Also new is the inclusion of ratings from Yahoo! users for each establishment to give added context. EverythingElse

  18. Flickr API • Photo sharing, tagging, community • Fully programmable • About 80 API calls • SOAP / REST / XML-RPC / FLASH • Geotagging maps pictures to locations • Samples in various languages available • Personalized results though Authentication API for • Web applications • Desktop • Mobile apps (http://www.flickr.com/services/api/auth.howto.mobile.html)

  19. Flickr Authentication for Mobile 1. Obtain an API key 2. Configure your key • Note down the Shared Secret • Title and Description are required for all applications • Choose a permission level for your application (r, w, del) • Note down your authentication URL. (http://www.flickr.com/auth-12345678) 3.Obtain a mini-token • Send the user to the authentication URL you obtained above. • User will be given a 9 digit code, for example: 123-456-789. • User need to enter this code into mobile application.

  20. Flickr Authentication for Mobile • Exchange the mini-token for a full token To obtain a full authentication token, call the flickr.auth.getFullToken method. * method = flickr.auth.getFullToken* api_key = 9a0554259914a86fb9e7eb014e4e5d52* mini_token = 123-456-789* api_sig = fddd34ac63af89b1b73b144aef8ef3d5 http://flickr.com/services/rest/?method=flickr.auth.getFullToken&api_key=9a0...&mini_token=12.. The response to the method call looks like this: <auth> <token>45-76598454353455</token><perms>read</perms><user nsid="12037949754@N01" username="Bees" fullname="Cal H" /> </auth> 5. Make an authenticated call Every authenticated call requires both the auth_token and api_sig arguments.

  21. del.icio.us API • del.icio.us is a collection of favorites - yours and everyone else's. • Keep links to your favorite articles, blogs, music, restaurant reviews, and more on del.icio.us and access them from any computer on the web. • Share favorites with friends, family, and colleagues. • Discover new things. Everything on del.icio.us is someone's favorite - they've already done the work of finding it. Explore and enjoy. • REST APIs • tags - get, rename, • tags/bundles - all, set, delete • posts - update, recent, get, all, dates, add, delete • The del.icio.us APIs use HTTP-Auth for user authentication

  22. Upcoming.org APIs • A community-driven event calendar where users interact with their friends around events. • 22 REST calls to work with • events • metros • venues • categories • watchlists • Users • RSS feeds for Metros, Groups, and user specific events as well as parameterizes search. • Token-based authentication (similar to Flickr)

  23. Music Engine Plug-Ins • The Yahoo! Music Engine is a pluggable, skinable music player for Windows • Released in May, currently in beta • Provides the full range of music listening options –your own MP3 library, streaming radio, stream on demand, purchase tracks, burn to CD, etc. • Plug-ins can be created in C/C++ or in the form of a Web page • Use Javascript to access the Music Engine object model from within the player • New: WebJay just joined the Yahoo! family. • It is a tool that helps you listen to and publish web playlists and also supports REST APIs

  24. Yahoo! Widgets • An application development platform that enables the creation of software “widgets” • Cross platform (Mac OS X/Windows) • Widgets are ridiculously easy to build (XML, Javascript, graphics) • Huge enhancements for 3.0 version like build in DOM parser, scrollbars, subviews… • FREE: Download at http://widgets.yahoo.com

  25. Yahoo! Developer Resources • Developer Web Site • http://developer.yahoo.net/ • Documentation, code examples, etc. • Developer Blog • http://developer.yahoo.net/blog/ • RSS goodness to keep up on our latest releases • Developer Community/Support • http://developer.yahoo.net/community/ • We mostly use Yahoo! Groups (mailing lists) for developer support • Ask Us About Commercial Use Of Our APIs • http://developer.yahoo.net/faq/#commercial

  26. Questions

More Related