MW-Peachy / Peachy

The official MediaWiki PHP bot framework. Current Version: 2.0 alpha 8
GNU General Public License v3.0
26 stars 21 forks source link

MediaWiki API overhaul #83

Open cyberpower678 opened 10 years ago

cyberpower678 commented 10 years ago

The Media Wiki API is going to be overhauled. This means radical changes that we need to apply to Peachy to keep Peachy bots running. Since this change is radical, we need to ensure that backwards compatibility is maintained for some time while other wikis run the current APIs. I have listed the things that may be changed that will affect Peachy. Please add on to this list if more comes out.

Things that are being changed:

  1. Anything using '' as a key will be renamed to something more natural. In some cases this may result in something like "query.page[1].foo['']" becoming simply "query.page[1].foo", and in others something like "query.page[1].foo.content".
  2. Boolean result properties will use boolean true as the value, rather than the empty string. Whether a property will be present with a boolean false value or will continue to be entirely absent from the result when false will be determined on a case-by-case basis.
  3. Page lists will be returned as arrays rather than objects with page_ids as keys. This will make it easier for clients to iterate over the results.
  4. Internationalizing API warnings and errors where error-language=none will need to be added to all API queries.
  5. Token handling: we will likely deprecate the get_tokens function and maintain it for backwards compatibility. The new meta=tokens will allow us to have Peachy retrieve fresh tokens in the same query as page content is retrieved.
  6. Removal of long-deprecated parameters. Most have already updated, but a double check may need to be required.
  7. Simplified continuation as default for action=query will likely affect list handler
  8. Simplified continuation should indicate "pause points" may improve list handling.
  9. Rewrite prop=imageinfo from scratch as prop=fileinfo. This will also likely lead to deprecating the Image and writing a brand new File class, which can better handle non-images.