{{>yql-mock-config}}

<div class="intro">
<p>In this example, the Flickr Recent Photos YQL table is used to pull in a small set of recent Flickr images every 8 seconds.</p>
</div>

<div class="example">
    {{>yql-requery-source}}
</div>
<h3>Setting Up the Query</h3>
<p>The easiest way to build a YQL query is by visiting the <a href="http://developer.yahoo.com/yql/console/">YQL Console</a>. In this example we will be using the <code><a href="http://developer.yahoo.com/yql/console/#h=select%20*%20from%20flickr.photos.recent">flickr.photos.recent</a></code> table. The <code>YQL</code> statement that we are using looks like this:</p>

```
select * from flickr.photos.recent where (api_key = "1895311ec0d2e23431a6407f3e8dffcc")
```

<h3>Setting Up the YUI Instance</h3>
<p>Now we need to create our YUI instance and tell it to load the <code>yql</code> and <code>node</code> modules.</p>

```
YUI().use('node', 'yql');
```

<h3>Making the Query</h3>
<p>Now that we have a YUI instance with the <code>yql</code> module, we can now make a query.</p>

```
{{>yql-requery-source-js}}
```
