| 1 |
{ |
| 2 |
"SMDVersion": "2.0", |
| 3 |
"id": "http://en.wikipedia.org/w/api.php", |
| 4 |
"description": "Wikipedia API", |
| 5 |
|
| 6 |
transport: "JSONP", |
| 7 |
envelope: "URL", |
| 8 |
additionalParameters: true, |
| 9 |
target: "http://en.wikipedia.org/w/api.php", |
| 10 |
parameters: [ |
| 11 |
{ name: "format", optional: false, "default": "json" } |
| 12 |
], |
| 13 |
|
| 14 |
services: { |
| 15 |
|
| 16 |
/* |
| 17 |
* This is a very very basic spec that just gives us a free-form API |
| 18 |
* endpoint to talk to. See http://en.wikipedia.org/w/api.php for |
| 19 |
* details on what parameters to supply and what sort of data you |
| 20 |
* should expect to see. Note that returned JSON is often somewhat |
| 21 |
* ... interesting ...: |
| 22 |
* |
| 23 |
* { |
| 24 |
* "parse": { |
| 25 |
* "text": { |
| 26 |
* "*": "<table ..." |
| 27 |
* }, |
| 28 |
* "langlinks": [ |
| 29 |
* { |
| 30 |
* "lang": "simple", |
| 31 |
* "*": "" |
| 32 |
* }, |
| 33 |
* // etc. |
| 34 |
* ] |
| 35 |
* } |
| 36 |
* } |
| 37 |
* |
| 38 |
* Not sure why we'd ever want an element to be named "*", but that's |
| 39 |
* how it is. So take care. |
| 40 |
* |
| 41 |
*/ |
| 42 |
query: { |
| 43 |
parameters: [ |
| 44 |
{ name: "action", type: "string", "default": "parse" } |
| 45 |
] |
| 46 |
} |
| 47 |
|
| 48 |
} |
| 49 |
} |