• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

YQL + YUI: Building End-to-End Applications

on

  • 4,722 views

View code examples here: https://github.com/pjdonnelly/yuiyqltalkexamples ...

View code examples here: https://github.com/pjdonnelly/yuiyqltalkexamples

When developing widgets it's not how to use YQL data that comes up in question, but how to access it. We'll go over starting your query out in the YQL console, how to access YQL data via the various endpoints and going through YQL's various authentication layers.

Statistics

Views

Total Views
4,722
Views on SlideShare
4,719
Embed Views
3

Actions

Likes
2
Downloads
58
Comments
1

2 Embeds 3

http://www.linkedin.com 2
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

YQL + YUI: Building End-to-End Applications YQL + YUI: Building End-to-End Applications Presentation Transcript

  • YQL + YUI: Building End-to-End Applications Nagesh Susarla & Paul Donnelly code examples: https://github.com/pjdonnelly/yuiyqltalkexamples
  • Application
  • Application Data
  • Application Data Visualization
  • Application Data Visualization
  • Application Data Visualization
  • XML
  • XML
  • XML JSON
  • XML JSON
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV Transform
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV
  • XML JSON CSV JSON
  • XML JSON CSV
  • XML JSON CSV XML
  • YQL Formats Accepts XML, JSON, CSV Outputs JSON, JSONP, XML, JSONP-X Lets you spend more time building your app
  • Fast, uses our global edge cache YQL is deployed across the world Default cache is 5 minutes You can control longer cache time via param _maxage=<seconds>
  • Various flavors of YQL Public endpoint Authenticated endpoint 2 legged OAuth 3 legged OAuth
  • App Development Pick the open tables to build the app Build new ones for your API if needed Test the tables in the YQL Console Use the YUI-YQL modules to get data Profit!
  • Overview Start with the YQL Console Console tour Various console parameters Finish with Using YQL data with YUI Public endpoint 2 legged OAuth Storing secrets with YQL 3 legged OAuth
  • http://developer.yahoo.com/yql/console
  • Various console parameters debug=true (developer.yahoo.com/yql/console/?debug=true) If working on an external table, YQL doesn’t cache it. Hot links the “id” attribute in the url node in diagnostics. Links to HTTP header dumping tool.
  • Link to HTTP Header Dump page
  • HTTP Header Dump
  • ?_uiFocus=flickr
  • diagnostics=true on by default on the console Not a passable param Access it via the console Shows: If the table is public or needs authentication. YQL build number. (http://yqlblog.net) System time and user time.
  • When YQL does your parallel requests you save time! 2711 - 1641 = 1070ms of time savings!
  • diagnostics=true remove from your actual YQL call to reduce your payload size. http://query.yahooapis.com/v1/public/yql?q=select %20*%20from%20flickr.photos.interestingness(20)
  • Overview Start with the YQL Console Console tour Various console parameters Finish with Using YQL data with YUI Public endpoint 2 legged OAuth Storing secrets with YQL 3 legged OAuth
  • Public endpoint http://query.yahooapis.com/v1/public/yql No authentication needed Easy to use Most tables accessible through the public endpoint.
  • Look at the REST query
  • Use the YQL YUI module
  • Use the DataSource.Get YUI module
  • Public endpoint http://query.yahooapis.com/v1/public/yql Per IP Limits: 1000 calls per hour. Caching is your friend.
  • Overview Start with the YQL Console Console tour Various console parameters Finish with Using YQL data with YUI Public endpoint 2 legged OAuth Storing secrets with YQL 3 legged OAuth
  • Authenticated endpoint http://query.yahooapis.com/v1/yql 2 legged OAuths Higher rate limits Per IP Limits: 10000 calls per hour. Need to access tables with security=”APP”
  • Get your keys https://developer.apps.yahoo.com/dashboard/createKey.html
  • Your Keys
  • Use the YQL YUI Module with 2 legged OAuth
  • Use YQL to call 2 legged OAuth services http://www.datatables.org/netflix/netflix.catalog.xml
  • desc netflix.catalog
  • Use the Query builder to quickly construct queries
  • Keys and Secrets in the open
  • env "store://datatables.org/alltableswithkeys"; set ck="uzgu8gzk7cb3u8vpf2p2a8" on netflix.catalog; set cks="psaqBzQt37" on netflix.catalog; env "store://datatables.org/alltableswithkeys";set ck="uzgu8gzk7cb3u8vpf2p2a8ak" on netflix.catalog;set cks="psaqBzQt37" on netflix.catalog;
  • Use YQL to hide your secrets
  • Use YQL to hide your secrets
  • Use the YQLRequest Module
  • Why yql.storage Adds a level of indirection between the ‘secrets’ and the user ‘SET’ calls are scoped to particular tables Exposing the execute key only gives access to that table VS all data accessible via the actual secrets. Analogy: Give the gardener the key to the backyard rather than the master key of your house
  • Overview Start with the YQL Console Console tour Various console parameters Finish with Using YQL data with YUI Public endpoint 2 legged OAuth Storing secrets with YQL 3 legged OAuth
  • 3 legged OAuth When to use 3 legged OAuth with YQL. How to find tables that require 3 legged OAuth. How to get YQL data via 3 legged OAuth Setting up your Yahoo CK and CKS. Example Code
  • http://paul.donnelly.org/yuiyqltalk/3leggedexample.php
  • How to find tables that require 3 legged OAuth
  • https://developer.apps.yahoo.com/ dashboard/createKey.html Get your CK and CKS
  • Yahoo Social SDK https://github.com/yahoo PHP Python Java ActionScript Objective-C .NET
  • https://gist.github.com/667462
  • https://gist.github.com/667462
  • http://paul.donnelly.org/yuiyqltalk/3leggedexample.php
  • Overview Start with the YQL Console Console tour Various console parameters Finish with Using YQL data with YUI Public endpoint 2 legged OAuth Storing secrets with YQL 3 legged OAuth
  • Best practices Don’t add random parameters to the YQL endpoint This cache busts YQL data
  • select * from ymail.folders
  • Use projection and local filtering to reduce payload
  • Use _maxage=<seconds> If you know your data doesn’t change often
  • Questions? and Thanks! Nagesh Susarla @nageshs on Twitter Paul Donnelly @pjdonnelly on Twitter