YQL - HackU IIT Madras 2012

982 views

Published on

Published in: Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
982
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

YQL - HackU IIT Madras 2012

  1. 1. Tapping the web for your hack http://www.flickr.com/photos/triller/2226679393/sizes/z/in/photostream/Pradeep B VDeveloper under construction, Yahoo!@pradeepbvhttp://slideshare.net/pradeepbv
  2. 2. Getting information off the Internet is like taking a drink from a fire hydrant. Mitchell Kaporhttp://www.flickr.com/photos/sfllaw/126657764/sizes/z/in/photostream/
  3. 3. Challenge is to figure out a way to get only what you want!http://www.flickr.com/photos/traftery/4330388280/sizes/z/in/photostream/
  4. 4. http://www.cloudave.com/282/paas-is-the-future-of-cloud-services-apis-are-the-key/
  5. 5. There are thousands of APIs…http://www.cloudave.com/282/paas-is-the-future-of-cloud-services-apis-are-the-key/
  6. 6. http://developer.yahoo.com/everything.html
  7. 7. http://developer.yahoo.com/everything.html
  8. 8. Are you asking me to do this in 24hrs?• You need to find data API• Get Access – Sign up for key• Find data endpoint• Read docs to learn what parameters you have• Get data in obscure format• Use data after converting and filtering• Model UI to use this data
  9. 9. http://www.quizzing.in/kolaveri-meaning
  10. 10. an API for the web
  11. 11. select * from internethttp://mlcwideangle.exbdblogs.com/files/2010/12/pun328-globe-light-bulb-world-map16.gif
  12. 12. Pull, mash, filter, tweak content from hundreds of APIs
  13. 13. Let your idea take center stagehttp://mlcwideangle.exbdblogs.com/files/2010/12/pun328-globe-light-bulb-world-map16.gif
  14. 14. Yahoo Query Language
  15. 15. You can select, filter, sort, limit
  16. 16. You can even insert, update, delete
  17. 17. select {what} from {where} where {conditions}
  18. 18. SELECT * FROM youtube.search(10) where query=kolaveri
  19. 19. SELECT * FROM flickr.photos.search where text="hacku" and api_key=“your_flickr_api_key"
  20. 20. select * from flickr.photos.info wherephoto_id in (select id from flickr.photos.search where woe_id in (select woeid from geo.places where text=chennai,india’ ) and license=4 and api_key=“your_flickr_api_key" )and api_key=“your_flickr_api_key"
  21. 21. INSERT INTO bitly.shorten (login, apiKey, longUrl) VALUES (ME, API_KEY, http://yahoo.com)
  22. 22. UPDATE social.profile.statusSET status="Using YQL UPDATE” WHERE guid=me
  23. 23. The easiest way to start with YQL is to use the consolehttp://developer.yahoo.com/yql/console
  24. 24. YQL: http://developer.yahoo.com/yql/console
  25. 25. Output formats are XML or JSON.JSON also allows for a callbackparameter to use the output directlyas JSON-P.
  26. 26. Find hackday tweets:SELECT * FROM twitter.search whereq=hackday’
  27. 27. Search Yahoo! Answers for resolved questionsabout cars:select * from answers.search wherequery="cars" and type="resolved”
  28. 28. Extract important terms from top stories onYahoo! news:select * from search.termextract wherecontext in (select description from rss whereurl=http://rss.news.yahoo.com/rss/topstories)
  29. 29. Find the location of IIT Chennai:select * from geo.placefinder where text="iit chennai"
  30. 30. Find distance between Bangalore andChennai:select * from geo.distance whereplace1="bangalore" and place2=”chennai”
  31. 31. Get stock quotes for Yahoo!, Apple, Google &Microsoft in one query:select * from yahoo.finance.quotes wheresymbol in ("YHOO","AAPL","GOOG","MSFT")
  32. 32. Shorten a URL:insert into yahoo.y.ahoo.it (url, keysize) values(http:// www.javarants.com, 5)
  33. 33. Search for iphone in criagslist:select * from craigslist.search wherelocation="chennai" and type="sss" andquery="iphone"
  34. 34. Scrape news from Yahoo! Finance:select * from html whereurl="http://finance.yahoo.com/q? s=yhoo"andxpath=//div[@id="yfi_headlines"]/div[2]/ul/li/a’
  35. 35. Select, filter data from google spreadsheets: select * from csv where url="https://docs.google.com/spreadsheet/p ub?key=0AvFtD9X4NsUjdDlfUWlmVmJIU1hZ WUVFMDZyaS1pdkE&output=csv" and col3 like %Mechanical%Interdisciplinary Research Projects at IIT Madras run by Mechanical Engg Dept.
  36. 36. Select, filter data from google spreadsheets: select * from csv where url="https://spreadsheets.google.com/pub?k ey=0ArYndzim- lbrdF8wc3A5QWl1ZGRpdkxRZk80SU9zUXc&o utput=csv" and col5 like Chennai%Details of MP’s from Chennai
  37. 37. Some YQL hacks
  38. 38. http://bit.ly/chromeYQL
  39. 39. ht t p:/ / w w w.w ebmeme.in
  40. 40. ht t p:/ / git hub.com/ yql/ yql -t ables
  41. 41. All Yahoo! APIs and Serviceshttp://developer.yahoo.com/everything.htmlYQL Documentationhttp://developer.yahoo.com/yqlYQL Consolehttp://developer.yahoo.com/yql/consoleYQL Github Account (Contribute Tables)http://github.com/yql/yql-tables

×