Skip to content
Browse files

Merge branch 'master' of git@github.com:pjdonnelly/yuiyqltalkexamples

  • Loading branch information...
2 parents 4dddd03 + 1a1f48a commit e4a1d26a18329c0b6bfb689805d3dcce161b2171 @pjdonnelly committed Nov 10, 2010
Showing with 50 additions and 50 deletions.
  1. +19 −19 yuiyqlmodule2leggedOAuth_example.html
  2. +13 −13 yuiyqlmodule_example.html
  3. +18 −18 yuiyqlrequestmodule_example.html
View
38 yuiyqlmodule2leggedOAuth_example.html
@@ -8,25 +8,25 @@
</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');
+ <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?'
- });
- });
- });
+ 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>
+</html>
View
26 yuiyqlmodule_example.html
@@ -8,18 +8,18 @@
</head>
<body>
<div id="results"></div>
- <script type="application/javascript">
- YUI().use('node','yql', function(Y) {
- 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);
- });
- });
- });
+ <script type="application/javascript">
+ YUI().use('node','yql', function(Y) {
+ 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);
+ });
+ });
+ });
</script>
</body>
-</html>
+</html>
View
36 yuiyqlrequestmodule_example.html
@@ -7,28 +7,28 @@
</script>
</head>
<body>
- <div id="title"></div>
+ <div id="title"></div>
<div id="img"></div>
-
- <script type="application/javascript">
- YUI().use('node','yql', function(Y) {
+
+ <script type="application/javascript">
+ YUI().use('node','yql', function(Y) {
var titlediv = Y.one('#title');
- var imgdiv = Y.one('#img');
+ var imgdiv = Y.one('#img');
+
+ //use YQLRequest if you need to change the protocol to https, otherwise you can use the regular Y.YQL module.
- //use YQLRequest if you need to change the protocol to https, otherwise you can use the regular Y.YQL module.
-
Y.YQL = new Y.YQLRequest('select * from netflix.catalog(1) where term = "breaking away"', function(r){
- var title = r.query.results.catalog_title.title.regular;
- var img = '<img src="'+r.query.results.catalog_title.box_art.large+'">';
- titlediv.append(title);
- imgdiv.append(img);
- }, {
- base: '://query.yahooapis.com/v1/yql?',
- env: 'store://257Bv7SEAYewPfoOdKMEvB'
- }, {
- proto: 'https'
- }).send();
+ var title = r.query.results.catalog_title.title.regular;
+ var img = '<img src="'+r.query.results.catalog_title.box_art.large+'">';
+ titlediv.append(title);
+ imgdiv.append(img);
+ }, {
+ base: '://query.yahooapis.com/v1/yql?',
+ env: 'store://257Bv7SEAYewPfoOdKMEvB'
+ }, {
+ proto: 'https'
+ }).send();
});
</script>
</body>
-</html>
+</html>

0 comments on commit e4a1d26

Please sign in to comment.
Something went wrong with that request. Please try again.