All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Changes that are required to maintain compatibility with new versions of MediaWiki are not considered breaking changes.
- Fix login for private wikis. Issue #17
- As recommended in the MediaWiki API documentation,
large API requests (more than 8000 characters) will be sent as
multipart/form-data
instead ofapplication/x-www-form-urlencoded
.
- Allow overriding the
*http.Client
client used byClient
.
- Get page functions no longer treat warnings as fatal errors. Return pages along with warnings instead of only returning the warnings if there are any. Fixes issue #9.
- Add
"rvslots": "main"
to the get page (prop=revisions
) requests. This change affectsGetPageByID
,GetPageByName
,GetPagesByID
, andGetPagesByName
. Thervslots
parameter is required by MediaWiki 1.32.0-wmf.15, which returns a warning if it is not used. Earlier versions of MediaWiki will return an "Unrecognized parameter: rvslots." warning when the parameter is used.
- Add canonical import path
cgt.name/pkg/go-mwclient/params
to params package.
- OAuth authentication
- Use version 2 of the MediaWiki JSON API by default.
New()
sets a 30 second HTTP timeout on the underlying HTTP client. Can be overridden with theSetHTTPTimeout()
method.- New method
AddRange()
onparams.Values
for adding multiple values at once.
New()
no longer returns an error if the userAgent parameter is empty. If empty, the default user agent will be used by itself.Login()
andLogout()
no longer modify the Client's API assertion level. If assertion is desired, the user must set it manually.Logout()
returns an error if the logout request fails.
- Fix API error parsing in
Login()
.