Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

YQL - HackU IIT Madras 2012

1.015 visualizaciones

Publicado el

Publicado en: Tecnología, Deportes
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

YQL - HackU IIT Madras 2012

  1. 1. Tapping the web for your hack B VDeveloper under construction, Yahoo!@pradeepbv
  2. 2. Getting information off the Internet is like taking a drink from a fire hydrant. Mitchell Kapor
  3. 3. Challenge is to figure out a way to get only what you want!
  4. 4.
  5. 5. There are thousands of APIs…
  6. 6.
  7. 7.
  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.
  10. 10. an API for the web
  11. 11. select * from internet
  12. 12. Pull, mash, filter, tweak content from hundreds of APIs
  13. 13. Let your idea take center stage
  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 where query=kolaveri
  19. 19. SELECT * FROM where text="hacku" and api_key=“your_flickr_api_key"
  20. 20. select * from wherephoto_id in (select id from 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,
  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 console
  24. 24. YQL:
  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 whereq=hackday’
  27. 27. Search Yahoo! Answers for resolved questionsabout cars:select * from 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=
  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 wheresymbol in ("YHOO","AAPL","GOOG","MSFT")
  32. 32. Shorten a URL:insert into (url, keysize) values(http://, 5)
  33. 33. Search for iphone in criagslist:select * from wherelocation="chennai" and type="sss" andquery="iphone"
  34. 34. Scrape news from Yahoo! Finance:select * from html whereurl=" 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=" 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=" ey=0ArYndzim- lbrdF8wc3A5QWl1ZGRpdkxRZk80SU9zUXc&o utput=csv" and col5 like Chennai%Details of MP’s from Chennai
  37. 37. Some YQL hacks
  38. 38.
  39. 39. ht t p:/ / w w w.w
  40. 40. ht t p:/ / git yql/ yql -t ables
  41. 41. All Yahoo! APIs and Services Documentation Console Github Account (Contribute Tables)