8. This can get complicated very quickly.
For each web service I need to:
Read API docs
Figure out REST endpoints
Figure out rate limits
Figure out syntax
9. YQL TO THE RESCUE
YQL is an expressive SQL-like
language that lets you
query, filter, and join data across
Web services.
SQL = familiar
Not limited to just Yahoo web
services, but any web service.
Single access point
Learn the YQL syntax to filter
data instead of learning an
individual API.
10. YQL TO THE RESCUE
Using YQL, accessing the web and
it’s API’s becomes as simple as
SQL:
select {what} from
{service} where
{condition}
11. RSS AGGREGATION
select * from feed where url in
("http://feeds.feedburner.com/TechCru
nch/","http://allthingsd.com/feed/")
13. RSS AGGREGATION
select title,description from feed where
url in
("http://feeds.feedburner.com/TechCru
nch/","http://allthingsd.com/feed/") |
sort(field="pubDate", descending="true
”)
14. SORT AND OTHER METHODS
Anything right of the | is performed after all select
operations are done.
Valid methods:
• sort
• tail (gets the last count items)
• truncate (gets the first count items)
• reverse
• unique (no duplicates)
• sanitize (emit safe html, prevents XSS)
21. FLICKR
Query for pizza:
select source from flickr.photos.sizes
where photo_id in (select id from
flickr.photos.search where
text=”pizza" and api_key=“” and
sort="relevance") and api_key=“”
and label="Medium"
35. YQL IN YAHOO PIPES
• http://pipes.yahoo.com
• Easy way to create RSS and create
complex data flows using a visual
editor.
• NEW!! YQL method
• y.pipe(“pipeid”,”<obj params>”)
38. YQL FORMATS
• Accepts JSON, XML, CSV
• Outputs XML, JSON, JSONP
• Provides data type transformers and mutators
• Tidies up data sources for you (html table)
• Lets you spend more time building your app
39. FAST, GLOBALLY AVAILABLE
• Deployed across the globe
• Both front and back facing caches
• Developers can control cache behavior
• _maxage=<seconds> parameter
• _stalewhilerevalidate=<seconds> parameter
• Rate limited for external developers
• 2000 calls per hour per IP on public endpoint
• 20000 on OAuth protected endpoint
40. APP DEVELOPMENT USING YQL
• Pick open tables or base YQL tables to build
your app.
• Build new ones for your API if needed
• Test the tables in the YQL console
• Use the YUI-YQL module to get data
• Or just call the REST query endpoint
41. TIPS
Search github.com/yql for table examples:
Use: http://developer.yahoo.com/yql/guide/
Use: http://christianheilmann.com/tag/yql/ for
awesome examples and inspiration