summaryrefslogtreecommitdiff
path: root/js/dojo/dojox/rpc/SMDLibrary/wikipedia.smd
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo/dojox/rpc/SMDLibrary/wikipedia.smd')
-rw-r--r--js/dojo/dojox/rpc/SMDLibrary/wikipedia.smd49
1 files changed, 49 insertions, 0 deletions
diff --git a/js/dojo/dojox/rpc/SMDLibrary/wikipedia.smd b/js/dojo/dojox/rpc/SMDLibrary/wikipedia.smd
new file mode 100644
index 0000000..d91b2c3
--- /dev/null
+++ b/js/dojo/dojox/rpc/SMDLibrary/wikipedia.smd
@@ -0,0 +1,49 @@
+{
+ "SMDVersion": "2.0",
+ "id": "http://en.wikipedia.org/w/api.php",
+ "description": "Wikipedia API",
+
+ transport: "JSONP",
+ envelope: "URL",
+ additionalParameters: true,
+ target: "http://en.wikipedia.org/w/api.php",
+ parameters: [
+ { name: "format", optional: false, "default": "json" }
+ ],
+
+ services: {
+
+ /*
+ * This is a very very basic spec that just gives us a free-form API
+ * endpoint to talk to. See http://en.wikipedia.org/w/api.php for
+ * details on what parameters to supply and what sort of data you
+ * should expect to see. Note that returned JSON is often somewhat
+ * ... interesting ...:
+ *
+ * {
+ * "parse": {
+ * "text": {
+ * "*": "<table ..."
+ * },
+ * "langlinks": [
+ * {
+ * "lang": "simple",
+ * "*": ""
+ * },
+ * // etc.
+ * ]
+ * }
+ * }
+ *
+ * Not sure why we'd ever want an element to be named "*", but that's
+ * how it is. So take care.
+ *
+ */
+ query: {
+ parameters: [
+ { name: "action", type: "string", "default": "parse" }
+ ]
+ }
+
+ }
+}