Function
Initializer for the Wikipedia data store interface.
The WikipediaStore is a data store interface to Wikipedia, using the Wikipedia SMD spec from dojox.rpc. It currently is useful only for finding articles that contain some particular text or grabbing single articles by full name; no wildcards or other filtering are supported.
var store = new dojox.data.WikipediaStore(); store.fetch({ query: {title:"Dojo Toolkit"}, onItem: function(item){ dojo.byId("somediv").innerHTML = item.text["*"]; } });
Function
Fetch a page or some partially-loaded search results from Wikipedia. Note that there isn't a way to sort data coming in from the API, so we just ignore the *sort* parameter.
Loading a page: store.fetch({ query: {title:"Dojo Toolkit"}, // define your handlers here });
Searching for pages containing "dojo": store.fetch({ query: { action: "query", text: "dojo" }, // define your handlers here });
Searching for the next 50 pages containing "dojo": store.fetch({ query: { action: "query", text: "dojo", start: 10, count: 50 // max 500; will be capped if necessary }, // define your handlers here });
Function
Object
Object