<?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>Derek Gathright &#187; yql</title>
	<atom:link href="http://www.derekville.net/tag/yql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.derekville.net</link>
	<description>Scribbles &#38; Bits</description>
	<lastBuildDate>Fri, 18 Jun 2010 17:36:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Node-YQL</title>
		<link>http://www.derekville.net/2010/node-yql/</link>
		<comments>http://www.derekville.net/2010/node-yql/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 20:29:04 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://www.derekville.net/?p=676</guid>
		<description><![CDATA[The more I play around with Node.js, the more I love server-side JavaScript. Once you get over the weirdness of writing JavaScript outside of the browser, it feels very natural. And the bonus is that it is blazing fast. Also, &#8230; <a href="http://www.derekville.net/2010/node-yql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div align="center" style="float:left; padding:20px;"><img src="http://farm3.static.flickr.com/2601/3858500752_9c3a39e4af.jpg" height="200" /></div>
<p>The more I play around with <a href="http://nodejs.org/">Node.js</a>, the more I love server-side JavaScript.  Once you get over the weirdness of writing JavaScript outside of the browser, it feels very natural.  And the bonus is that it is blazing fast.  </p>
<p>Also, as I&#8217;ve been playing around with <a href="http://developer.yahoo.com/yql/">YQL</a> (Yahoo Query Language) more lately, I realized I wanted to be able to access YQL data from within my Node app.  So, I created a <a href="http://github.com/drgath/node-yql">node-yql </a> module.  </p>
<p>Now you can do something like&#8230;</p>
<div style="clear:both"></div>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">YQL.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;SELECT * FROM weather.forecast WHERE location=90066&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> location  <span style="color: #339933;">=</span> response.<span style="color: #660066;">query</span>.<span style="color: #660066;">results</span>.<span style="color: #660066;">channel</span>.<span style="color: #660066;">location</span><span style="color: #339933;">,</span>
	    condition <span style="color: #339933;">=</span> response.<span style="color: #660066;">query</span>.<span style="color: #660066;">results</span>.<span style="color: #660066;">channel</span>.<span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">condition</span><span style="color: #339933;">;</span>
&nbsp;
	sys.<span style="color: #660066;">puts</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;The current temperature in &quot;</span> <span style="color: #339933;">+</span> location.<span style="color: #660066;">city</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; is &quot;</span> <span style="color: #339933;">+</span> condition.<span style="color: #660066;">temp</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; degrees&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Output: The current temperature in Los Angeles is 57 degrees</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.derekville.net/2010/node-yql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
