--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/media/js/lib/yui/yui_3.10.3/docs/yql/index.html Tue Jul 16 14:29:46 2013 +0200
@@ -0,0 +1,284 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>YQL Query</title>
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
+ <link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css">
+ <link rel="stylesheet" href="../assets/css/main.css">
+ <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
+ <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
+ <script src="../../build/yui/yui-min.js"></script>
+
+</head>
+<body>
+<!--
+<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
+-->
+<div id="doc">
+ <div id="hd">
+ <h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1>
+ </div>
+
+ <a href="#toc" class="jump">Jump to Table of Contents</a>
+
+
+ <h1>YQL Query</h1>
+ <div class="yui3-g">
+ <div class="yui3-u-3-4">
+ <div id="main">
+ <div class="content"><div class="intro">
+<img alt="" style="float: right; margin-left: 15px; border: 1px solid #D9D9D9;" src=
+"http://l.yimg.com/a/i/us/pps/yql128.gif">
+
+<p><a href="http://developer.yahoo.com/yql/">The Yahoo! Query Language</a> (YQL) is an expressive SQL-like
+language that lets you query, filter, and join data across
+Web services. With YQL, <i>apps run faster with fewer lines
+of code and a smaller network footprint.</i></p>
+
+<p>Yahoo! and other websites across the Internet make much
+of their structured data available to developers, primarily
+through Web services. To access and query these services,
+developers traditionally endure the pain of locating the
+right URLs and documentation to access and query each Web
+service.</p>
+
+<p>With YQL, developers can access and shape data across
+the Internet through one simple language, eliminating the
+need to learn how to call different APIs.</p>
+</div>
+
+<h2 id="getting-started">Getting Started</h2>
+
+<p>
+To include the source files for YQL Query and its dependencies, first load
+the YUI seed file if you haven't already loaded it.
+</p>
+
+<pre class="code prettyprint"><script src="http://yui.yahooapis.com/3.10.3/build/yui/yui-min.js"></script></pre>
+
+
+<p>
+Next, create a new YUI instance for your application and populate it with the
+modules you need by specifying them as arguments to the <code>YUI().use()</code> method.
+YUI will automatically load any dependencies required by the modules you
+specify.
+</p>
+
+<pre class="code prettyprint"><script>
+// Create a new YUI instance and populate it with the required modules.
+YUI().use('yql', function (Y) {
+ // YQL Query is available and ready for use. Add implementation
+ // code here.
+});
+</script></pre>
+
+
+<p>
+For more information on creating YUI instances and on the
+<a href="http://yuilibrary.com/yui/docs/api/classes/YUI.html#method_use"><code>use()</code> method</a>, see the
+documentation for the <a href="../yui/index.html">YUI Global Object</a>.
+</p>
+
+
+<h2 id="query">Making a Query</h2>
+<p>After you find the query you want to run in the Developer Console, just plug it in:</p>
+<p>The <a href="http://developer.yahoo.com/yql/console/">YQL Developer Console</a> is a nice place to start playing with YQL queries. You can test and inspect queries before you actually use them.</p>
+
+<pre class="code prettyprint">YUI().use('yql', function(Y) {
+
+ Y.YQL('select * from weather.forecast where location=90210', function(r) {
+ //r now contains the result of the YQL Query
+ //use the YQL Developer console to learn
+ //what data is coming back in this object
+ //and how that data is structured.
+ });
+
+});</pre>
+
+
+
+<h2 id="query-reuse">Re-Using A Query</h2>
+<p>Modifying the example above to make it reusable is simple, just save the result of the query and call <code>send</code> on it to query for the results again.</p>
+
+<pre class="code prettyprint">YUI().use('yql', function(Y) {
+
+ var q = Y.YQL('select * from weather.forecast where location=90210', function(r) {
+ //r now contains the result of the YQL Query
+ });
+
+ //Sometime later
+
+ q.send();
+
+});</pre>
+
+
+
+<h2 id="changing-a-re-used-query">Changing A Re-Used Query</h2>
+<p>Changing a query without creating a new instance can be beneficial for queries that involve the same request but different parameters (like an AutoComplete query).</p>
+<p>To do this, we need to modify the private param <code>q</code> on the YQL instance.</p>
+
+<pre class="code prettyprint">YUI().use('yql', function(Y) {
+
+ var q = Y.YQL('select * from weather.forecast where location=90210', function(r) {
+ //r now contains the result of the YQL Query
+ });
+
+ //Sometime later
+ q._params.q = 'select * from weather.forecast where location=62959';
+ q.send();
+
+});</pre>
+
+
+<h2 id="tables">Open Data Tables</h2>
+<p>Open Data Tables enable developers to add tables for any data on the Web to YQL's stable of API-specific tables. Using Open Data Tables, anyone can make their data YQL-accessible. If you would like to create an Open Data Table, visit the community page at <a href="http://datatables.org">http://datatables.org</a>.</p>
+<p>By default, the <code>YQL</code> module will include the environment file needed to use all of the publicly available Open Data Tables.</p>
+
+<h2 id="advoptions">Advanced Options</h2>
+<p>The default configuration for the <code>YQL</code> module is designed for the most basic use cases. However, the <code>YQLRequest</code> class is designed to give the developer more control over the query, parameters and options used to make the YQL Request.</p>
+
+<pre class="code prettyprint">YUI().use('yql', function(Y) {
+
+ var q = new Y.YQLRequest('select * from weather.forecast where location=90210', function(r) {
+ //r now contains the result of the YQL Query
+ }, {
+ //Optional URL Parameters to add to the request
+ foo: 'bar',
+ another: 'option'
+ }, {
+ //Options
+ base: '://query.yahooapis.com/v1/yql?', //Different base URL for private data
+ proto: 'https' //Connect using SSL
+ });
+ q.send();
+
+});</pre>
+
+</div>
+ </div>
+ </div>
+
+ <div class="yui3-u-1-4">
+ <div class="sidebar">
+
+ <div id="toc" class="sidebox">
+ <div class="hd">
+ <h2 class="no-toc">Table of Contents</h2>
+ </div>
+
+ <div class="bd">
+ <ul class="toc">
+<li>
+<a href="#getting-started">Getting Started</a>
+</li>
+<li>
+<a href="#query">Making a Query</a>
+</li>
+<li>
+<a href="#query-reuse">Re-Using A Query</a>
+</li>
+<li>
+<a href="#changing-a-re-used-query">Changing A Re-Used Query</a>
+</li>
+<li>
+<a href="#tables">Open Data Tables</a>
+</li>
+<li>
+<a href="#advoptions">Advanced Options</a>
+</li>
+</ul>
+ </div>
+ </div>
+
+
+
+ <div class="sidebox">
+ <div class="hd">
+ <h2 class="no-toc">Examples</h2>
+ </div>
+
+ <div class="bd">
+ <ul class="examples">
+
+
+ <li data-description="Create a simple YQL Query to retrieve data from the Yahoo! Weather YQL table.">
+ <a href="simple-yql.html">Simple YQL Query</a>
+ </li>
+
+
+
+ <li data-description="Use the Flickr Recent Photos YQL table to pull in a small set of recent Flickr images every 8 seconds.">
+ <a href="yql-requery.html">Reusing a YQL query</a>
+ </li>
+
+
+
+
+
+
+ </ul>
+ </div>
+ </div>
+
+
+
+ <div class="sidebox">
+ <div class="hd">
+ <h2 class="no-toc">Examples That Use This Component</h2>
+ </div>
+
+ <div class="bd">
+ <ul class="examples">
+
+
+
+
+
+
+ <li data-description="Example Photo Browser application.">
+ <a href="../dd/photo-browser.html">Photo Browser</a>
+ </li>
+
+
+
+ <li data-description="Portal style example using Drag & Drop Event Bubbling and Animation.">
+ <a href="../dd/portal-drag.html">Portal Style Example</a>
+ </li>
+
+
+ </ul>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+</div>
+
+<script src="../assets/vendor/prettify/prettify-min.js"></script>
+<script>prettyPrint();</script>
+
+<script>
+YUI.Env.Tests = {
+ examples: [],
+ project: '../assets',
+ assets: '../assets/yql',
+ name: 'yql',
+ title: 'YQL Query',
+ newWindow: '',
+ auto: false
+};
+YUI.Env.Tests.examples.push('simple-yql');
+YUI.Env.Tests.examples.push('yql-requery');
+YUI.Env.Tests.examples.push('photo-browser');
+YUI.Env.Tests.examples.push('portal-drag');
+
+</script>
+<script src="../assets/yui/test-runner.js"></script>
+
+
+
+</body>
+</html>