Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Yahoo APIs For Mobile: Content, Location and Context - OverTheAir 2009


Published on

Yahoo Developer Network ( offers a lot of APIs that are well known to web developers. In this talk we have a look at how some of the APIs can be put to use by mobile developers, specially from the prism of adding value to their mobile applications by using 3 key differentiators from web development: content, location and context

Published in: Technology, Business
  • Be the first to comment

Yahoo APIs For Mobile: Content, Location and Context - OverTheAir 2009

  1. using Yahoo! APIs for the mobile web: content, location and context ricardo varela overtheair09 London, 25th sept 2009
  2. the age of mobile is nigh! (no, really...) iphone, android, mobile 2.0, mobile services, ubiquitous experience, j2me, micropayments, widget, app store, personalization, SDK , location-based services, ecosystems, mobile porn, data plans, cloud data, customer loyalty, mobile marketing, w3c MWI, pay through phone, message-based services, mobile-first experience, femtocells, global reach, music downloads, mobile convergence buzzwords selected on purpose to beat the keyword bingo! img by David Malcomson
  3. but... what does mobile mean? mobile is not just a smaller screen information where you need it things you can do only now img from
  4. what works in mobile? data from all about the iphone, comscore mobile study and apple store
  5. trying to summarize it in some way... content location and context
  6. and what does yahoo have to do with this? we have been playing mobile for long but that’s not all!
  7. the yahoo developer network
  8. content finance, hotjobs, upcoming, local, weather, flickr, music, answers, search make your own: hadoop, pig
  9. example: wassup!
  10. but we always end up mixing services $myurl = sprintf('', $maxPerPage, $bbox, FLICKR_API_KEY, $page, TAGS); $xml_doc = DOMDocument::load($xml); $xpath = new DOMXPath($xml_doc); $result = $xpath->query("//rsp/photos/photo"); foreach($result as $item){ $photo_id = $item->getAttribute('id'); $infourl = sprintf('', FLICKR_API_KEY, $id); $info_doc = DOMDocument::load($infourl); $xpath_info = new DOMXPath($info_doc); $image_url = $xpath_info->query("//urls/url"); // insert more processing here... }
  11. content: YQL, the swiss army knife of data select * from internet offers simple access to all of services from yahoo... ... or from outside (
  12. so that we end up with this... select urls.url from where photo_id in ( select id from where text="tate modern") imgs from housemouse and wellsoitappears on twitter
  13. or other similar cases... select title,abstract,url from where query="iphone" select * from where query="sushi" and location="san francisco, ca" and Rating.AverageRating>4.0 select name, website from music.artist.similar where id in (select id from music.artist.popular)
  14. and it is also good for scraping... select src from html where url in (“”, “”) and xpath=”//div[@class=’entry’]/div/div/p/img” use " cineworld.cinemasearch.xml" as cinemas; select * from cinemas where nearlocation="wc2h" select * from microformats where url=""
  15. and has widgety goodness Use server side... YQL_IMG_EXTRACT = " q=select%20*%20from%20html%20where%20url%3D'{URL}'%20and %20xpath%3D'%2F%2Fbody%5B%40id%3D%22noticias%22%5D%2Fdiv%5B %40id%3D%22wrapper%22%5D%2Fdiv%5B2%5D%2F%2Fimg%5B%40title %5D'%20limit%203&format=json" def images url = YQL_IMG_EXTRACT.gsub(/{URL}/, CGI.escape(self.url)) results = JSON.parse(open(url).read)['query']['results']
  16. and has widgety goodness ...or straight from the client! function get() { var old = document.getElementById('triggerscript'); if(old){ old.parentNode.removeChild(old); } var where = document.getElementById('loc').value; var url='*%20from %20where%20text%3D%22'+encodeURIComponent(where)+'%22)%20limit%20'+count+'%20offset %20'+offset+'%20%7C%20sort(field%3D%22start_date %22)&format=json&callback=displayResult'; var s = document.createElement('script'); s.setAttribute('id','triggerscript'); s.setAttribute('src',url); document.getElementsByTagName('head')[0].appendChild(s); return false; }
  17. there’s also location maps, placemaker, fireeagle
  18. again, we could use those from yql // check for geo references SELECT * FROM geo.placemaker WHERE documentContent = "First we take Manhattan, and then we take Berlin" AND documentType="text/plain" // geolocate all places in a page and give me the maps... select * from where (latitude, longitude) IN (SELECT, FROM geo.placemaker WHERE documentURL = "" AND documentType="text/html") // combine place names with a text search for adding “location search” select * from where price_max=1000 and bedroom_min = 1 and listing_type="rent" and place_name in ( select name from geo.places.neighbors where neighbor_woeid in ( select woeid from geo.places where text="pimlico, uk" limit 1 ) limit 3 )
  19. with the exception of fireeagle (for now...) also, a comment on auth modes (app or mobile auth should work just fine)
  20. and finally, context... there’s more context than just location contacts, address book, social directory, boss keywords
  21. example: trendnews
  22. example: trendnews trending topic “Les Paul” estadounidense-les-paul/288969.shtml select * from search.web where sites=" fallece-a-los-anos-guitarrista-estadounidense-les-paul/ 288969.shtml" and view="keyterms" and query="les paul"
  23. and for more...
  24. so get on hacking... we have some nice present full of caffeinated goodness for the best hack using Yahoo! APIs for details on how to send yours, check the site!
  25. and let us know if we can lend a hand! YDN forums The Y! guys (located around bean bag area)
  26. thank you! ricardo varela