MediaWiki-Bot

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      - Retries: Until success
  - Make test 98 fail gracefully on platforms without the test suite
  - Fix some really weird spacing in the Makefile.PL
  - The other maxlag options, along with lots of other defaults, will probably
    be modifiable in 1.4 with a sort of config sub. This will allow the custom
    configuration of options for WWW::Mechanize and MediaWiki::API, so you don't
    need to go sourcediving or remember the order for the parameters to the constructor.
  - Since wiki.xyrael.net is down, tests 1, 8, 10, 11

1.3.5 2008-10-04
  - Allowing cascade protection now. This may or may not work, since there
    are some changes being made to the protection API.
  - Anonymous editing should work. If you still can not use this framework
    to edit, I need to be contacted. To this end, I've enabled an editing test,
    hopefully cpan-testers sends me good results :)
  - Fix a stupid mistake I made regarding the names of certain parameters to get_history

1.3.4 2008-09-11
  - Some triage after the first CPAN test results came in:
  - Appearantly, get_pages_in_category was running test file 08, test 2, very
    slowly because I was loading a 1000+ page category in sets of 10 pages at a time.

README  view on Meta::CPAN

    if not.

    References: API:Logevents
    <https://www.mediawiki.org/wiki/API:Logevents>

 get_protection

    Returns data on page protection as a array of up to two hashrefs. Each
    hashref has a type, level, and expiry. Levels are 'sysop' and
    'autoconfirmed'; types are 'move' and 'edit'; expiry is a timestamp.
    Additionally, the key 'cascade' will exist if cascading protection is
    used.

        my $page = 'Main Page';
        $bot->edit({
            page    => $page,
            text    => rand(),
            summary => 'test',
        }) unless $bot->get_protection($page);

    You can also pass an arrayref of page titles to do bulk queries:

README.mkdn  view on Meta::CPAN


Returns whether a user was ever locked. You should probably call this method
only when your bot is operating on Meta - this method will warn if not.

**References:** [API:Logevents](https://www.mediawiki.org/wiki/API:Logevents)

## get\_protection

Returns data on page protection as a array of up to two hashrefs. Each hashref
has a type, level, and expiry. Levels are 'sysop' and 'autoconfirmed'; types are
'move' and 'edit'; expiry is a timestamp. Additionally, the key 'cascade' will
exist if cascading protection is used.

    my $page = 'Main Page';
    $bot->edit({
        page    => $page,
        text    => rand(),
        summary => 'test',
    }) unless $bot->get_protection($page);

You can also pass an arrayref of page titles to do bulk queries:

lib/MediaWiki/Bot.pm  view on Meta::CPAN


Returns whether a user was ever locked. You should probably call this method
only when your bot is operating on Meta - this method will warn if not.

B<References:> L<API:Logevents|https://www.mediawiki.org/wiki/API:Logevents>

=head2 get_protection

Returns data on page protection as a array of up to two hashrefs. Each hashref
has a type, level, and expiry. Levels are 'sysop' and 'autoconfirmed'; types are
'move' and 'edit'; expiry is a timestamp. Additionally, the key 'cascade' will
exist if cascading protection is used.

    my $page = 'Main Page';
    $bot->edit({
        page    => $page,
        text    => rand(),
        summary => 'test',
    }) unless $bot->get_protection($page);

You can also pass an arrayref of page titles to do bulk queries:



( run in 0.976 second using v1.01-cache-2.11-cpan-49f99fa48dc )