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.

Hack Day EU 2011 YQL

6,977 views

Published on

"YQL and other hack APIs" presentation for May 2011 Yahoo! Developer Network Hack Day EU in Bucharest, Romania.

Published in: Technology
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❤❤❤ http://bit.ly/39pMlLF ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/39pMlLF ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • The video of the presentation that goes along with these slides is available at http://www.youtube.com/watch?v=1PDaDMV5Gp8
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Hack Day EU 2011 YQL

  1. 1.
  2. 2. YQL and the API hack stack<br />Jonathan LeBlanc<br />Principal Software Engineer / Technology Evangelist<br />Twitter: @jcleblanc<br />
  3. 3. What We’re Going to Cover<br />YQL Overview<br />Making Queries and the Console Sandbox<br />Open Data Tables (a.k.a. Adding New Features into YQL)<br />Execute (Server-Side JavaScript)<br />Final Lessons<br />
  4. 4. What We’re Going to Cover<br />YQL Overview<br />Making Queries and the Console Sandbox<br />Open Data Tables (a.k.a. Adding New Features into YQL)<br />Execute (Server-Side JavaScript)<br />Final Lessons<br />
  5. 5. Overview: Don’t reinvent the wheel!<br />
  6. 6. Overview: The Components of YQL<br />YQL Service<br />Web API<br />YQL Table<br />USER<br />
  7. 7. Overview: YQLFETCHesdata<br />
  8. 8. Overview: YQL Sets and deletes data<br />
  9. 9. Overview: IS YQL A DATABASE?<br />
  10. 10. Overview:YQL is not a database<br />
  11. 11. What We’re Going to Cover<br />YQL Overview<br />Making Queries and the Console Sandbox<br />Open Data Tables (a.k.a. Adding New Features into YQL)<br />Execute (Server-Side JavaScript)<br />Final Lessons<br />
  12. 12. Making Requests: Fetching data<br />SELECT myColumn, myTitle<br />FROM myTable(0, 50) <br />WHERE myColumn = 'value' <br />AND myTitle = 'title‘<br />LIMIT 3 OFFSET 10<br />
  13. 13. MakingRequests: Inserting data<br />INSERT INTO bitly.shorten (login, apiKey, longUrl)<br />VALUES ('ME', 'API_KEY', 'http://yahoo.com') <br />
  14. 14. MakingRequests: updating data<br />UPDATE social.profile.status<br />SET status="Using YQL UPDATE” <br />WHERE guid="NJFIDHVPVVISDX7UKED2WHU"<br />
  15. 15. MakingRequests: deleting data<br />DELETE FROM twittertable<br />WHERE tweetid="12345" <br />AND username="twitter_username" <br />AND password="twitter_password"<br />
  16. 16. MakingRequests: Sub Selects<br />SELECT * FROM geo.places WHERE textIN (SELECT location FROM social.profile WHERE guid = me)<br />
  17. 17. MakingRequests: The yql console<br />http://developer.yahoo.com/yql/console<br />
  18. 18. MakingRequests: Flickr URLs<br /><photofarm="3"<br />id="5708163920"<br />isfamily="0"<br />isfriend="0"<br />ispublic="1"<br />owner="31832337@N04"<br />secret="0075137487"<br />server="2496"<br />title="San Francisco"/><br />
  19. 19. MakingRequests: Flickr URLs<br />Photo URL<br />http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}.jpg<br />Photo Page URL<br />http://www.flickr.com/photos/{$owner}/{$id}<br />Photo Owner Profile URL<br />http://www.flickr.com/photos/{$owner}<br />
  20. 20. Making Requests: url structure<br />http://query.yahooapis.com/v1/yql?[params]<br />http://query.yahooapis.com/v1/public/yql?[params]<br />Params<br /><ul><li>q= [ YQL QUERY ]
  21. 21. format = [ XML / JSON]
  22. 22. diagnostics = [ true / false ]
  23. 23. debug = [ true / false ]
  24. 24. env= [ .env file URL ]
  25. 25. callback = [ function name ]</li></li></ul><li>Making Requests: Private Data<br />http://query.yahooapis.com/v1/yql<br />Uses OAuth 1.0 for authorization<br />OAuth is complicated – use one of our SDKs athttps://github.com/yahoo<br />
  26. 26. Making Requests: Let’s See It<br />
  27. 27. What We’re Going to Cover<br />YQL Overview<br />Making Queries and the Console Sandbox<br />Open Data Tables (a.k.a. Adding New Features into YQL)<br />Execute (Server-Side JavaScript)<br />Final Lessons<br />
  28. 28. Open Data Tables: Top Level<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /> <meta></meta> <br /> <bindings></bindings><br /></table><br />
  29. 29. Open Data Tables: Meta Node<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /><meta></meta> <br /> <bindings></bindings><br /></table><br />
  30. 30. Open Data Tables: Meta Node<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /><meta><br /><author>Jonathan LeBlanc</author> <br /> <description>My Table</description> <br /> <documentationURL>www.site.com<br /> </documentationURL> <br /> <sampleQuery>SELECT * FROM {table}<br /> </sampleQuery><br /> </meta> <br /> <bindings></bindings><br /></table><br />
  31. 31. Open Data Tables: Bindings Node<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /> <meta></meta> <br /><bindings></bindings><br /></table><br />
  32. 32. Open Data Tables: Bindings Node<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /> <meta></meta> <br /><bindings><br /><select itemPath="top.child" produces="XML"> <br /> <urls> <br /> <urlenv="all">http://www.site.com/{user}</url> <br /> </urls> <br /> <inputs> <br /> <key id="user" type="xs:string" paramType="path" <br /> required="true" /><br /> </inputs> <br /> </select><br /> </bindings><br /></table><br />
  33. 33. Open Data Tables: Using Your Table<br />Several Choices:<br />Upload the XML file to our community Github account.<br />Upload the XML file to your own site and use the YQL ‘USE’ clause.<br />
  34. 34. Open Data Tables: Community Tables<br />http://github.com/yql/yql-tables<br />
  35. 35. Open Data Tables: Using The USE Clause<br />The USE clause<br />USE 'http://www.mysite.com/my_table.xml' <br />ASmytable; <br />SELECT * FROMmytable<br />WHERE user='john_doe'<br />
  36. 36. What We’re Going to Cover<br />YQL Overview<br />Making Queries and the Console Sandbox<br />Open Data Tables (a.k.a. Adding New Features into YQL)<br />Execute (Server-Side JavaScript)<br />Final Lessons<br />
  37. 37. Execute: Execute Node<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /> <meta></meta> <br /> <bindings><br /><select itemPath="top.child" produces="XML"> <br /> <urls></urls> <br /> <inputs></inputs> <br /> </select><br /> </bindings><br /></table><br />
  38. 38. Execute: Execute Node<br /><?xml version="1.0" encoding="UTF-8"?><br /><table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <br /> <meta></meta> <br /> <bindings><br /><select itemPath="top.child" produces="XML"> <br /> <urls></urls> <br /> <inputs></inputs><br /><execute></execute><br /> </select><br /> </bindings><br /></table><br />
  39. 39. Execute: Server-Side JavaScript<br /><execute><br /> <![CDATA[<br /> //get user specified inputs from YQL query<br />vararrQueries = inputs['query'];<br /> //create new XML nodes<br />varelQueries = <queries/>;<br /> //output new node as YQL response <br />response.object = elQueries;<br /> ]]><br /></execute> <br />
  40. 40. What We’re Going to Cover<br />YQL Overview<br />Making Queries and the Console Sandbox<br />Open Data Tables (a.k.a. Adding New Features into YQL)<br />Execute (Server-Side JavaScript)<br />Final Lessons<br />
  41. 41. Final Lessons<br />YQL is a skeleton key for all Yahoo! APIs<br />Open data tables allow you to create new data feeds out of one or many different raw sources<br />Execute allows you to manipulate data before it is returned.<br />Use SDKs when accessing private data that requires OAuth<br />
  42. 42. Final Lessons: Links<br />All Yahoo! APIs and Services<br />http://developer.yahoo.com/everything.html<br />YQL Documentation<br />http://developer.yahoo.com/yql<br />YQL Console<br />http://developer.yahoo.com/yql/console<br />YQL Github Account (Contribute Tables)<br />http://github.com/yql/yql-tables<br />
  43. 43. Any questions?<br />http://www.slideshare.com/jcleblanc/<br />Jonathan LeBlanc<br />Twitter: @jcleblanc<br />E-Mail: jleblanc@yahoo-inc.com<br />

×