SlideShare a Scribd company logo
1 of 39
YQL and the API hack stack Jonathan LeBlanc Principal Software Engineer / Technology Evangelist Twitter: @jcleblanc
What We’re Going to Cover YQL Overview Making Queries and the Console Sandbox Open Data Tables (a.k.a. Adding New Features into YQL) Execute (Server-Side JavaScript) Final Lessons
What We’re Going to Cover YQL Overview Making Queries and the Console Sandbox Open Data Tables (a.k.a. Adding New Features into YQL) Execute (Server-Side JavaScript) Final Lessons
Overview: Don’t reinvent the wheel!
Overview: The Components of YQL YQL Service Web API YQL Table USER
Overview: YQL FETCHes data
Overview: YQL Sets and deletes data
Overview: IS YQL A DATABASE?
Overview: YQL is not a database
What We’re Going to Cover YQL Overview Making Queries and the Console Sandbox Open Data Tables (a.k.a. Adding New Features into YQL) Execute (Server-Side JavaScript) Final Lessons
Making Requests: Fetching data SELECT myColumn, myTitle FROM myTable(0, 50)  WHERE myColumn = 'value'  AND myTitle = 'title‘ LIMIT 3 OFFSET 10
Making Requests: Inserting data INSERT INTO bitly.shorten (login, apiKey, longUrl) VALUES ('ME', 'API_KEY', 'http://yahoo.com')
Making Requests: updating data UPDATE social.profile.status SET status="Using YQL UPDATE”  WHERE guid="NJFIDHVPVVISDX7UKED2WHU"
Making Requests: deleting data DELETE FROM twittertable WHERE tweetid="12345"  AND username="twitter_username"  AND password="twitter_password"
Making Requests: Sub Selects SELECT * FROM geo.places WHERE text IN (SELECT location FROM social.profile WHERE guid = me)
Making Requests: The yql console http://developer.yahoo.com/yql/console
Making Requests: Flickr URLs <photo 	farm="3"  id="5708163920"  isfamily="0"  isfriend="0"  ispublic="1"  owner="31832337@N04"  secret="0075137487"  server="2496"  title="San Francisco"/>
Making Requests: Flickr URLs Photo URL http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}.jpg Photo Page URL http://www.flickr.com/photos/{$owner}/{$id} Photo Owner Profile URL http://www.flickr.com/photos/{$owner}
Making Requests: url structure http://query.yahooapis.com/v1/yql?[params] http://query.yahooapis.com/v1/public/yql?[params] Params ,[object Object]
format =      	[ XML / JSON]
diagnostics =	[ true / false ]
debug =       	[ true / false ]
callback =    	[ function name ],[object Object]
Making Requests: Let’s See It
What We’re Going to Cover YQL Overview Making Queries and the Console Sandbox Open Data Tables (a.k.a. Adding New Features into YQL) Execute (Server-Side JavaScript) Final Lessons
Open Data Tables: Top Level <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">         <meta></meta>         <bindings></bindings> </table>
Open Data Tables: Meta Node <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">     <meta></meta>         <bindings></bindings> </table>
Open Data Tables: Meta Node <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">     <meta>         <author>Jonathan LeBlanc</author>                    <description>My Table</description>          <documentationURL>www.site.com         </documentationURL>                <sampleQuery>SELECT * FROM {table}          </sampleQuery>     </meta>         <bindings></bindings> </table>
Open Data Tables: Bindings Node <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">         <meta></meta>     <bindings></bindings> </table>
Open Data Tables: Bindings Node <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">         <meta></meta>     <bindings> <select itemPath="top.child" produces="XML">              <urls>                  <urlenv="all">http://www.site.com/{user}</url>              </urls>              <inputs>                 <key id="user" type="xs:string" paramType="path"                     required="true" />             </inputs>          </select>      </bindings> </table>
Open Data Tables: Using Your Table Several Choices: Upload the XML file to our community Github account. Upload the XML file to your own site and use the YQL ‘USE’ clause.
Open Data Tables: Community Tables http://github.com/yql/yql-tables
Open Data Tables: Using The USE Clause The USE clause USE 'http://www.mysite.com/my_table.xml'  AS mytable;  SELECT * FROM mytable WHERE user='john_doe'
What We’re Going to Cover YQL Overview Making Queries and the Console Sandbox Open Data Tables (a.k.a. Adding New Features into YQL) Execute (Server-Side JavaScript) Final Lessons
Execute: Execute Node <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">         <meta></meta>         <bindings> <select itemPath="top.child" produces="XML">              <urls></urls>              <inputs></inputs>          </select>      </bindings> </table>
Execute: Execute Node <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">         <meta></meta>         <bindings> <select itemPath="top.child" produces="XML">              <urls></urls>              <inputs></inputs>  <execute></execute>         </select>      </bindings> </table>
Execute: Server-Side JavaScript <execute>     <![CDATA[     //get user specified inputs from YQL query vararrQueries = inputs['query'];     //create new XML nodes varelQueries = <queries/>;     //output new node as YQL response  response.object = elQueries;     ]]> </execute>
What We’re Going to Cover YQL Overview Making Queries and the Console Sandbox Open Data Tables (a.k.a. Adding New Features into YQL) Execute (Server-Side JavaScript) Final Lessons

More Related Content

What's hot

Cheap tricks for startups
Cheap tricks for startupsCheap tricks for startups
Cheap tricks for startupsSimon Willison
 
A journey beyond the page object pattern
A journey beyond the page object patternA journey beyond the page object pattern
A journey beyond the page object patternRiverGlide
 
Unchain Your Web Development With Django
Unchain Your Web Development With DjangoUnchain Your Web Development With Django
Unchain Your Web Development With DjangoJoey Wilhelm
 
Goodle Developer Days Madrid 2008 - Open Social Update
Goodle Developer Days Madrid 2008 - Open Social UpdateGoodle Developer Days Madrid 2008 - Open Social Update
Goodle Developer Days Madrid 2008 - Open Social UpdatePatrick Chanezon
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events WebStackAcademy
 

What's hot (7)

Opensocial
OpensocialOpensocial
Opensocial
 
React, Flux and a little bit of Redux
React, Flux and a little bit of ReduxReact, Flux and a little bit of Redux
React, Flux and a little bit of Redux
 
Cheap tricks for startups
Cheap tricks for startupsCheap tricks for startups
Cheap tricks for startups
 
A journey beyond the page object pattern
A journey beyond the page object patternA journey beyond the page object pattern
A journey beyond the page object pattern
 
Unchain Your Web Development With Django
Unchain Your Web Development With DjangoUnchain Your Web Development With Django
Unchain Your Web Development With Django
 
Goodle Developer Days Madrid 2008 - Open Social Update
Goodle Developer Days Madrid 2008 - Open Social UpdateGoodle Developer Days Madrid 2008 - Open Social Update
Goodle Developer Days Madrid 2008 - Open Social Update
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 

Viewers also liked

Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFREToolsSebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFREToolsSource Conference
 
YQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationYQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationKorben00
 
Conférence Net Neutrality
Conférence Net NeutralityConférence Net Neutrality
Conférence Net NeutralityKorben00
 
Yahoo BOSS Presentation London Open Hack Day Talk Boss
Yahoo BOSS Presentation London Open Hack Day Talk   BossYahoo BOSS Presentation London Open Hack Day Talk   Boss
Yahoo BOSS Presentation London Open Hack Day Talk BossKorben00
 
Double Dog Dare
Double Dog Dare Double Dog Dare
Double Dog Dare halffast
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICSource Conference
 
iBanking - a botnet on Android
iBanking - a botnet on AndroidiBanking - a botnet on Android
iBanking - a botnet on AndroidSource Conference
 

Viewers also liked (8)

Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFREToolsSebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
 
YQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationYQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentation
 
Conférence Net Neutrality
Conférence Net NeutralityConférence Net Neutrality
Conférence Net Neutrality
 
Yahoo BOSS Presentation London Open Hack Day Talk Boss
Yahoo BOSS Presentation London Open Hack Day Talk   BossYahoo BOSS Presentation London Open Hack Day Talk   Boss
Yahoo BOSS Presentation London Open Hack Day Talk Boss
 
Million Browser Botnet
Million Browser BotnetMillion Browser Botnet
Million Browser Botnet
 
Double Dog Dare
Double Dog Dare Double Dog Dare
Double Dog Dare
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUIC
 
iBanking - a botnet on Android
iBanking - a botnet on AndroidiBanking - a botnet on Android
iBanking - a botnet on Android
 

Similar to Build APIs and mashup data with YQL and the API hack stack

Browser MVC with YQL and YUI
Browser MVC with YQL and YUIBrowser MVC with YQL and YUI
Browser MVC with YQL and YUIJonathan LeBlanc
 
Struts2
Struts2Struts2
Struts2yuvalb
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop NotesPamela Fox
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLseleciii44
 
Introduction to YQL - Talk at HackU 2010, IIT Chennai
Introduction to YQL - Talk at HackU 2010, IIT ChennaiIntroduction to YQL - Talk at HackU 2010, IIT Chennai
Introduction to YQL - Talk at HackU 2010, IIT ChennaiBalaji Narayanan
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationDavid Calavera
 
Open social 2.0 sandbox ee and breaking out of the gadget box
Open social 2.0 sandbox  ee and breaking out of the gadget boxOpen social 2.0 sandbox  ee and breaking out of the gadget box
Open social 2.0 sandbox ee and breaking out of the gadget boxRyan Baxter
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2wiradikusuma
 
Intro Open Social and Dashboards
Intro Open Social and DashboardsIntro Open Social and Dashboards
Intro Open Social and DashboardsAtlassian
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Matt Raible
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
USC Yahoo! BOSS, YAP and YQL Overview
USC Yahoo! BOSS, YAP and YQL OverviewUSC Yahoo! BOSS, YAP and YQL Overview
USC Yahoo! BOSS, YAP and YQL OverviewJonathan LeBlanc
 
FOWA 09 - Open Strategy Applied
FOWA 09 - Open Strategy AppliedFOWA 09 - Open Strategy Applied
FOWA 09 - Open Strategy AppliedDan Theurer
 

Similar to Build APIs and mashup data with YQL and the API hack stack (20)

Browser MVC with YQL and YUI
Browser MVC with YQL and YUIBrowser MVC with YQL and YUI
Browser MVC with YQL and YUI
 
YQL Overview
YQL OverviewYQL Overview
YQL Overview
 
Html5
Html5Html5
Html5
 
Struts2
Struts2Struts2
Struts2
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
 
Hacking with YUI
Hacking with YUIHacking with YUI
Hacking with YUI
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTL
 
Introduction to YQL - Talk at HackU 2010, IIT Chennai
Introduction to YQL - Talk at HackU 2010, IIT ChennaiIntroduction to YQL - Talk at HackU 2010, IIT Chennai
Introduction to YQL - Talk at HackU 2010, IIT Chennai
 
Jsp
JspJsp
Jsp
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementation
 
Open social 2.0 sandbox ee and breaking out of the gadget box
Open social 2.0 sandbox  ee and breaking out of the gadget boxOpen social 2.0 sandbox  ee and breaking out of the gadget box
Open social 2.0 sandbox ee and breaking out of the gadget box
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Intro Open Social and Dashboards
Intro Open Social and DashboardsIntro Open Social and Dashboards
Intro Open Social and Dashboards
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
USC Yahoo! BOSS, YAP and YQL Overview
USC Yahoo! BOSS, YAP and YQL OverviewUSC Yahoo! BOSS, YAP and YQL Overview
USC Yahoo! BOSS, YAP and YQL Overview
 
FOWA 09 - Open Strategy Applied
FOWA 09 - Open Strategy AppliedFOWA 09 - Open Strategy Applied
FOWA 09 - Open Strategy Applied
 
Yahoo - Open Applied
Yahoo - Open AppliedYahoo - Open Applied
Yahoo - Open Applied
 

More from Jonathan LeBlanc

JavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJonathan LeBlanc
 
Improving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsImproving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsJonathan LeBlanc
 
Better Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessBetter Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessJonathan LeBlanc
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with BoxJonathan LeBlanc
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer WorkshopJonathan LeBlanc
 
Modern Cloud Data Security Practices
Modern Cloud Data Security PracticesModern Cloud Data Security Practices
Modern Cloud Data Security PracticesJonathan LeBlanc
 
Understanding Box UI Elements
Understanding Box UI ElementsUnderstanding Box UI Elements
Understanding Box UI ElementsJonathan LeBlanc
 
Understanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingUnderstanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingJonathan LeBlanc
 
The Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyThe Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyJonathan LeBlanc
 
Modern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensModern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensJonathan LeBlanc
 
Creating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchCreating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchJonathan LeBlanc
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaJonathan LeBlanc
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsJonathan LeBlanc
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data SecurityJonathan LeBlanc
 
PHP Identity and Data Security
PHP Identity and Data SecurityPHP Identity and Data Security
PHP Identity and Data SecurityJonathan LeBlanc
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaJonathan LeBlanc
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsJonathan LeBlanc
 
Future of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityFuture of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityJonathan LeBlanc
 

More from Jonathan LeBlanc (20)

JavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the Client
 
Improving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsImproving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data Insights
 
Better Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessBetter Data with Machine Learning and Serverless
Better Data with Machine Learning and Serverless
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with Box
 
Box Platform Overview
Box Platform OverviewBox Platform Overview
Box Platform Overview
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer Workshop
 
Modern Cloud Data Security Practices
Modern Cloud Data Security PracticesModern Cloud Data Security Practices
Modern Cloud Data Security Practices
 
Box Authentication Types
Box Authentication TypesBox Authentication Types
Box Authentication Types
 
Understanding Box UI Elements
Understanding Box UI ElementsUnderstanding Box UI Elements
Understanding Box UI Elements
 
Understanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingUnderstanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scoping
 
The Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyThe Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments Globally
 
Modern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensModern API Security with JSON Web Tokens
Modern API Security with JSON Web Tokens
 
Creating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchCreating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from Scratch
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication Media
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile Payments
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data Security
 
PHP Identity and Data Security
PHP Identity and Data SecurityPHP Identity and Data Security
PHP Identity and Data Security
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication Media
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile Payments
 
Future of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityFuture of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable Security
 

Recently uploaded

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Recently uploaded (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

Build APIs and mashup data with YQL and the API hack stack

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