Module: MediaWiki::Query::Lists::Log::Rights

Included in:
MediaWiki::Query::Lists::Log
Defined in:
lib/mediawiki/query/lists/log/rights.rb

Overview

TODO:

rights/erevoke

Instance Method Summary collapse

Instance Method Details

#get_autopromotion_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default) ⇒ Array<Hash<Symbol, Any>>

Gets rights/autopromote logs.

Parameters:

Returns:

  • (Array<Hash<Symbol, Any>>)

    The events, containing the following keys: id, title, user, new_rights, old_rights, comment, timestamp.

See Also:

Since:

  • 0.10.0



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/mediawiki/query/lists/log/rights.rb', line 13

def get_autopromotion_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  resp = get_log('rights/autopromote', user, title, start, stop,
                 limit)

  ret = []
  resp['query']['logevents'].each do |log|
    ret << loghash_rightsautopromote(log)
  end

  ret
end

#get_rights_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default) ⇒ Array<Hash<Symbol, Any>>

Gets rights/rights logs.

Parameters:

Returns:

  • (Array<Hash<Symbol, Any>>)

    The events, containing the following keys: id, title, to, from, new_rights, old_rights, comment, timestamp.

See Also:

Since:

  • 0.10.0



31
32
33
34
35
36
37
38
39
40
# File 'lib/mediawiki/query/lists/log/rights.rb', line 31

def get_rights_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  resp = get_log('rights/rights', user, title, start, stop, limit)

  ret = []
  resp['query']['logevents'].each do |log|
    ret << loghash_rightsrights(log)
  end

  ret
end