As you might have noticed, there have recently been many changes to
MediaWiki API. This is in part due to my push for API
2.0<http://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap/Naming_Clean…>,
which will include API versioning, streamlined JSON-only result format,
localized warnings and errors, naming
cleanup<http://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap/Naming_Clean…>,
and many other changes. On top of that, there has been various proposals
for content-oriented RESTful API (as oppose to SQL-like query API). To
learn more or to participate in the planning or implementation, see proposed
changes <http://www.mediawiki.org/wiki/Requests_for_comment/API_Future> or
contact me directly.
*
*
There will be a
conference<https://en.wikipedia.org/wiki/Wikipedia:Meetup/NYC/Wikipedia_Day>in
New York tomorrow, Feb 23rd, at NYU. I intend to do an introductory
API
presentation there, partially covering some of the proposed changes. Please
stop by if you want to discuss API, or just to say hi.
*Important reminder to API users*: Please ensure you set the user agent
string to contain both the name of your tool, the framework it uses, and a
way to contact you. See User-Agent
policy<http://meta.wikimedia.org/wiki/User-Agent_policy>.
API users that do not follow this policy may be banned at any moment.
Example:* MyCoolTool/1.1 (http://example.com/MyCoolTool/;
MyCoolTool(a)example.com) BasedOnSuperLib/1.4*
Lastly, to minimize traffic on this list, I will try to batch announcements
into one email, unless there is an immediate breaking change.
* prop=pageprops & ppprom=... now allows multiple
values<https://gerrit.wikimedia.org/r/#/c/41590/>
(anomie)
* Extensions: $wgAPIGeneratorModules is now
obsolete<https://gerrit.wikimedia.org/r/#/c/46196/>, the
list of generators is now dynamic (yurik)
* HTML-formatted results (format=*fm) will now wrap long
lines<https://gerrit.wikimedia.org/r/#/c/37188/>(waldir)
--yurik
In change I7a3d7b6e[1] which was recently merged, the ApiPageSet
module received a major overhaul. In particular, the parameters to the
constructor have changed, and it now extends ApiBase rather than
ApiQueryBase. These changes will not affect API clients, but any
third-party API modules that use ApiPageSet will need to be updated.
Also as part of this change, ApiQuery is losing its newGenerator() and
executeGeneratorModule() methods, and ApiQueryGeneratorBase's
setGeneratorMode() is gaining a required parameter. These methods are
unlikely to have been used in non-core code.
This brings with it enhanced functionality: non-query actions using
ApiPageSet may now use generators. The core action=purge and
action=setnotificationtimestamp modules have already been enhanced in
this way.
This change should go live on WMF wikis with 1.21wmf10; see the
roadmap for details.[2]
[1]: https://gerrit.wikimedia.org/r/#/c/44087/
[2]: https://www.mediawiki.org/wiki/MediaWiki_1.21/Roadmap
--
Brad Jorsch
Software Engineer
Wikimedia Foundation