Permalink
Browse files

No commit message

  • Loading branch information...
1 parent e4a1d26 commit 409a7c55e1024939facdc41281678a0a2e1be2a3 @pjdonnelly committed Nov 10, 2010
Showing with 30 additions and 30 deletions.
  1. +30 −30 yqldatasourcemodule_example.html
@@ -9,35 +9,35 @@
<body>
<div id="results"></div>
<script type="application/javascript">
- YUI().use("node","datasource-get", "datasource-jsonschema", function(Y) {
- var res = Y.one('#results');
-
- var myDataSource = new Y.DataSource.Get({
- source:"http://query.yahooapis.com/v1/public/yql?format=json&"}),
- myCallback = {
- success: function(e){
- Y.each(e.response.results, function(v){
- var img = '<img src="'+v.url+'">';
- res.append(img);
- });
- },
- failure: function(e){
- alert("Could not retrieve data: " + e.error.message);
- }
- };
-
- myDataSource.plug(Y.Plugin.DataSourceJSONSchema, {
- schema: {
- resultListLocator: "query.results.result",
- resultFields: ["url"]
- }
- });
-
- myDataSource.sendRequest({
- request:"q=select%20url%20from%20search.images(5)%20where%20query%20in%20(select%20title%20from%20rss%20where%20url%3D%22http%3A%2F%2Fbuzzlog.buzz.yahoo.com%2Ffeeds%2Fbuzzactm.xml%22)",
- callback:myCallback
- });
- });
+ YUI().use("node","datasource-get", "datasource-jsonschema", function(Y) {
+ var res = Y.one('#results');
+
+ var myDataSource = new Y.DataSource.Get({
+ source:"http://query.yahooapis.com/v1/public/yql?format=json&"}),
+ myCallback = {
+ success: function(e){
+ Y.each(e.response.results, function(v){
+ var img = '<img src="'+v.url+'">';
+ res.append(img);
+ });
+ },
+ failure: function(e){
+ alert("Could not retrieve data: " + e.error.message);
+ }
+ };
+
+ myDataSource.plug(Y.Plugin.DataSourceJSONSchema, {
+ schema: {
+ resultListLocator: "query.results.result",
+ resultFields: ["url"]
+ }
+ });
+
+ myDataSource.sendRequest({
+ request:"q=select%20url%20from%20search.images(5)%20where%20query%20in%20(select%20title%20from%20rss%20where%20url%3D%22http%3A%2F%2Fbuzzlog.buzz.yahoo.com%2Ffeeds%2Fbuzzactm.xml%22)",
+ callback:myCallback
+ });
+ });
</script>
</body>
-</html>
+</html>

0 comments on commit 409a7c5

Please sign in to comment.