Skip Menu |

This queue is for tickets about the MediaWiki-API CPAN distribution.

Report information
The Basics
Id: 72404
Status: resolved
Priority: 0/
Queue: MediaWiki-API

People
Owner: Nobody in particular
Requestors: wade.penner [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.35
Fixed in: (no value)



Subject: Action watch now requires token
I used to be able to watch a file as follows: $mw->api( { action => 'watch', title => "$_->{title}", watch } ) But since https://bugzilla.wikimedia.org/show_bug.cgi?id=29070 was implemented in 1.18, it now requires a token. I get the following error: notoken: The token parameter must be set.
On Sun Nov 13 13:06:49 2011, thewade wrote: Show quoted text
> I used to be able to watch a file as follows: > $mw->api( { action => 'watch', title => "$_->{title}", watch } ) > > But since https://bugzilla.wikimedia.org/show_bug.cgi?id=29070 was > implemented in 1.18, it now requires a token. > > I get the following error: > notoken: The token parameter must be set.
for the time being if using 1.18, then just get a token then and pass that. i may make it easier with the api in an upcoming version to get the token for you, but it's simple enough to get one yourself.
I finally got around to testing this. sorry for the delay. This actually already works with the current code base. Just use the MediaWiki::API->edit( { action => 'watch', title => "Main_Page" } ); function and a token will be automatically retrieved and cached. I just need to add a small note to the documentation.