<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hybrid Garden &#187; MooTools</title>
	<atom:link href="http://hybridgarden.com/blog/tags/mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://hybridgarden.com/blog</link>
	<description>Rhys Burnie&#039;s Artwork and Web Development blog</description>
	<lastBuildDate>Mon, 08 Nov 2010 23:58:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A simple MooTools yql extension for the Request class</title>
		<link>http://hybridgarden.com/blog/web-devlopment/request-yql/</link>
		<comments>http://hybridgarden.com/blog/web-devlopment/request-yql/#comments</comments>
		<pubDate>Sun, 02 May 2010 03:23:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Devlopment]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[YQL]]></category>

		<guid isPermaLink="false">http://hybridgarden.com/blog/?p=96</guid>
		<description><![CDATA[Request.YQL
 Extends: Request.JSONP
A very simple extension that accepts a YQL query and makes the call returning data from YQL in json format (default). 
 Accepts all inherited options from the Request.* classes up the Request.JSONP family line but url must be the service url. The default value of format is&#8220;json&#8221; it can be any of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Request.YQL</strong><strong><br />
 Extends: </strong>Request.JSONP</p>
<p>A very simple extension that accepts a <abbr title="Yahoo! Query Language">YQL</abbr> query and makes the call returning <em>data</em> from YQL in <abbr title="JavaScript Object Notation">json</abbr> format <sup>(default)</sup>. <br />
 Accepts all inherited options from the Request.* classes up the Request.JSONP family line but <em>url</em> must be the service url. The default value of <em>format</em> is<em>&#8220;json&#8221; </em>it can be any of the defined YQL formats.</p>
<p><strong>NB:</strong> The .send() method needs to be called and a <em>onSuccess</em> defined for it to do anything. Example:</p>
<pre class="brush: js">new Request.YQL("show tables",{
	onSuccess: function(data) {
				console.log(data);
			 }
}).send();
</pre>
<h3>Mo&#8217; Info</h3>
<ul>
<li><a href="http://developer.yahoo.com/yql/console/">http://developer.yahoo.com/yql/console/</a></li>
<li><a href="http://mootools.net/docs/more/Request/Request.JSONP">http://mootools.net/docs/more/Request/Request.JSONP</a></li>
</ul>
<pre class="brush: js">/** ============================================================================
 * YQL driver
 * Extends: Request.JSONP
 *
 * @version		1.0
 *
 * @license		MIT-style license
 * @author 		Rhys Burnie
 * @copyright		Author &lt;rhys [at] hybridgarden.com&gt;
 * @param 		{String} YQL query
 * @param 		{Object} Request options
 * 				   NB: options.url must be to the YQL service (default to v1 path)
 */
if( ($chk(Request) &amp;&amp; $chk(Request.JSONP)) &amp;&amp; !$chk(Request.YQL) ) {
	Request.YQL = new Class({
		Extends: Request.JSONP,
		options: {
			url: "http://query.yahooapis.com/v1/public/yql?",
			format: 'json'
		},
		initialize: function(query,options) {
			this.parent(options);
	        	if (!query)
	            	return;
	        	this.options.url = this.options.url + 'q=' + encodeURIComponent(query) + '&amp;format='+this.options.format;
		},
	    success: function(data, script) {
	        this.parent(data, script);
	    }
	});
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hybridgarden.com/blog/web-devlopment/request-yql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

