Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 409a7c55e1
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (30 sloc) 1.551 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>YUI3 YQL Module signed with 2legged OAuth example</title>
        <script type="text/javascript" charset="utf-8" src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js">
        </script>
    </head>
    <body>
        <div id="results"></div>
        <script type="application/javascript">
            YUI({ gallery: 'gallery-2010.08.11-20-39' }).use('node', 'yql', 'gallery-oauth', function(Y) {
                Y.oAuth.ready(function() {
                    
                var res = Y.one('#results');
                
                    Y.YQL('select url from search.images(5) where query in (select title from rss where url="http://buzzlog.buzz.yahoo.com/feeds/buzzactm.xml")', function(r){
                        Y.each(r.query.results.result, function(v){
                            var img = '<img src="'+v.url+'">';
                            res.append(img);
                        });
                    }, {
                        //get these at https://developer.apps.yahoo.com/dashboard/createKey.html
                        key: '<your key>',
                        secret: '<your secret>',
                        base: '://query.yahooapis.com/v1/yql?'
                    });
                });
            });
        </script>
    </body>
</html>
Something went wrong with that request. Please try again.