Module: MediaWiki::Query::Lists::Log::Import

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

Instance Method Summary collapse

Instance Method Details

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

Gets import/interwiki logs.

Parameters:

Returns:

  • (Array<Hash>)

    The events, containing the following keys: id, title, user, comment, timestamp, count, interwiki_title.

See Also:

Since:

  • 0.10.0



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

def get_interwiki_import_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  resp = get_log('import/interwiki', user, title, start, stop, limit)

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

  ret
end

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

Gets import/upload logs.

Parameters:

Returns:

  • (Array<Hash>)

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

See Also:

Since:

  • 0.10.0



28
29
30
31
32
33
34
35
36
37
# File 'lib/mediawiki/query/lists/log/import.rb', line 28

def get_upload_import_log(user = nil, title = nil, start = nil, stop = nil, limit = @query_limit_default)
  resp = get_log('import/upload', user, title, start, stop, limit)

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

  ret
end