User:Zakgreant/API docs integration

Jump to navigation Jump to search


  • get API docs using paraminfo (see #Implementation below)
    • can we get all the info we need from paraminfo?
    • should we extend paraminfo to dump _everything_ when given a special query (probably not needed right now)
  • convert the API's output into wiki format

Docs Structure[edit]

  • autogenerate structure
  • one article per
    • action/prop/meta/list
    • (action/prop/meta/list/...) and parameter combination?
      • this will be very short for some things and long for others
      • allows us to easily transclude just the info needed, if we are talking about one particular parameter
  • not sure about all this. probably just need to autogenerate some structures and see how they work

URI Structure[edit]

  • API((/Action|List|Prop|Meta)(/Property)?)?


  • Category:MediaWiki API
  • Category:MediaWiki API/Action
  • Category:MediaWiki API/Query/List
  • Category:MediaWiki API/Query/Meta
  • Category:MediaWiki API/Query/Prop
  • Category:MediaWiki API/ClassName?
  • Category:Autogenerated
    • We want to make sure that we flag the stuff that we autogenerate so that we can mangle it with more confidence :)

Docs notes[edit]

  • Document the running version of the API, as that is what people most rely on.
    • Do and Wikipedia run different versions of the API?
      • Nope, all cluster non "test" wiki's run the "WMF" branch. So they should be exactly the same


  1. Grab list of modules from
    1. Careful with non core Api modules (CR, LQT, et al. Be nice to document similarily in future, but not needed now)
  2. Iterate over list, fetching additional details for each module with ?action=paraminfo&modules=$name
  3. Get list of lists, meta and props from ?action=paraminfo&modules=query
    1. Same as above, non core Api Modules
  4. Iterate over list, fetching additional details with ?action=paraminfo&querymodules=$name

Page structure[edit]

  • infobox with info about read/write/etc status, etc.
  • descriptions, examples, etc.
  • ...

Misc. stuff[edit]

  • We should alphabeti[zs]e the lists returned by the help functions
  • We may also wish to wrap long lines output by the help action
  • Should we (and if so, how?) look at documenting "core"/wmf used extension API modules