Module: MediaWiki::Query::Lists::Log::Block

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

Instance Method Summary collapse

Instance Method Details

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

Gets block/block logs.

Parameters:

Returns:

  • (Array<Hash>)

    The events, containing the following keys: id, blocked, flags, duration, expiry, blocker, comment, timestamp.

See Also:

Since:

  • 0.10.0



19
20
21
22
23
24
25
26
27
28
# File 'lib/mediawiki/query/lists/log/block.rb', line 19

def get_block_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  response = get_log('block/block', user, title, start, stop, limit)

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

  ret
end

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

Gets block/reblock logs.

Parameters:

Returns:

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

    The events, containing the following keys: id, blocked, flags, duration, expiry, blocker, comment, timestamp.

See Also:

Since:

  • 0.10.0



36
37
38
39
40
41
42
43
44
45
# File 'lib/mediawiki/query/lists/log/block.rb', line 36

def get_reblock_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  response = get_log('block/reblock', user, title, start, stop, limit)

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

  ret
end

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

Gets block/unblock logs.

Parameters:

Returns:

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

    The events, containing the following keys: id, blocked, blocker, comment, timestamp.

See Also:

Since:

  • 0.10.0



53
54
55
56
57
58
59
60
61
62
# File 'lib/mediawiki/query/lists/log/block.rb', line 53

def get_unblock_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  response = get_log('block/unblock', user, title, start, stop, limit)

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

  ret
end