liuyg
2021-07-02 25ce610f6ecca7325e7a743dc032c4a76559c63d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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" }
            ]
        }
 
    }
}