root / trunk / web / dojo / dojox / data / GoogleFeedStore.js @ 12
History | View | Annotate | Download (1.33 KB)
1 |
/*
|
---|---|
2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4 |
see: http://dojotoolkit.org/license for details
|
5 |
*/
|
6 |
|
7 |
|
8 |
if(!dojo._hasResource["dojox.data.GoogleFeedStore"]){ |
9 |
dojo._hasResource["dojox.data.GoogleFeedStore"]=true; |
10 |
dojo.provide("dojox.data.GoogleFeedStore");
|
11 |
dojo.experimental("dojox.data.GoogleFeedStore");
|
12 |
dojo.require("dojox.data.GoogleSearchStore");
|
13 |
dojo.declare("dojox.data.GoogleFeedStore",dojox.data.GoogleSearchStore,{_type:"",_googleUrl:"http://ajax.googleapis.com/ajax/services/feed/load",_attributes:["title","link","author","published","content","summary","categories"],_queryAttrs:{"url":"q"},getFeedValue:function(_1,_2){ |
14 |
var _3=this.getFeedValues(_1,_2); |
15 |
if(dojo.isArray(_3)){
|
16 |
return _3[0]; |
17 |
} |
18 |
return _3;
|
19 |
},getFeedValues:function(_4,_5){ |
20 |
if(!this._feedMetaData){ |
21 |
return _5;
|
22 |
} |
23 |
return this._feedMetaData[_4]||_5; |
24 |
},_processItem:function(_6,_7){ |
25 |
this.inherited(arguments); |
26 |
_6["summary"]=_6["contentSnippet"]; |
27 |
_6["published"]=_6["publishedDate"]; |
28 |
},_getItems:function(_8){ |
29 |
if(_8["feed"]){ |
30 |
this._feedMetaData={title:_8.feed.title,desc:_8.feed.description,url:_8.feed.link,author:_8.feed.author}; |
31 |
return _8.feed.entries;
|
32 |
} |
33 |
return null; |
34 |
},_createContent:function(_9,_a,_b){ |
35 |
var cb=this.inherited(arguments); |
36 |
cb.num=(_b.count||10)+(_b.start||0); |
37 |
return cb;
|
38 |
}}); |
39 |
} |