module MediaWiki::Query::Lists::Log::Block

Public Instance Methods

get_block_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default) click to toggle source

Gets block/block logs. @param user [String] See {MediaWiki::Query::Lists::Log#get_log} @param title [String] See {MediaWiki::Query::Lists::Log#get_log} @param start [DateTime] See {MediaWiki::Query::Lists::Log#get_log} @param stop [DateTime] See {MediaWiki::Query::Lists::Log#get_log} @param limit [Fixnum] See {MediaWiki::Query::Lists::Log#get_log} @see MediaWiki::Query::Lists::Log#get_log @see www.mediawiki.org/wiki/API:Logevents MediaWiki Logevents API Docs @since 0.10.0 @return [Array<Hash>] The events, containing the following keys: id, blocked, flags, duration, expiry,

blocker, comment, timestamp.
# 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) click to toggle source

Gets block/reblock logs. @param (see get_block_log) @see (see get_block_log) @since 0.10.0 @return [Array<Hash<Symbol, Any>>] The events, containing the following keys: id, blocked, flags, duration,

expiry, blocker, comment, timestamp.
# 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) click to toggle source

Gets block/unblock logs. @param (see get_block_log) @see (see get_block_log) @since 0.10.0 @return [Array<Hash<Symbol, Any>>] The events, containing the following keys: id, blocked, blocker,

comment, timestamp.
# 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