wikipedia.smd 1.1 KB

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