Module: MediaWiktory::Wikipedia::Modules::Checkuserlog

Defined in:
lib/mediawiktory/wikipedia/modules/checkuserlog.rb

Overview

Get entries from the CheckUser log.

The "submodule" (MediaWiki API term) is included in action after setting some param, providing additional tweaking for this param. Example (for Actions::Query and its submodules):

api.query             # returns Actions::Query
   .prop(:revisions)  # adds prop=revisions to action URL, and includes Modules::Revisions into action
   .limit(10)         # method of Modules::Revisions, adds rvlimit=10 to URL

All submodule's parameters are documented as its public methods, see below.

Instance Method Summary collapse

Instance Method Details

#continue(value) ⇒ self

When more results are available, use this to continue.

Parameters:

  • value (String)

Returns:

  • (self)


78
79
80
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 78

def continue(value)
  merge(culcontinue: value.to_s)
end

#dir(value) ⇒ self

In which direction to enumerate:

Parameters:

  • value (String)

    One of "newer" (List oldest first. Note: culstart has to be before culend), "older" (List newest first (default). Note: culstart has to be later than culend).

Returns:

  • (self)


49
50
51
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 49

def dir(value)
  _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}"
end

#from(value) ⇒ self

The timestamp to start enumerating from.

Parameters:

  • value (Time)

Returns:

  • (self)


62
63
64
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 62

def from(value)
  merge(culfrom: value.iso8601)
end

#limit(value) ⇒ self

Limit of rows.

Parameters:

  • value (Integer, "max")

Returns:

  • (self)


41
42
43
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 41

def limit(value)
  merge(cullimit: value.to_s)
end

#target(value) ⇒ self

Checked user, IP address, or CIDR range.

Parameters:

  • value (String)

Returns:

  • (self)


33
34
35
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 33

def target(value)
  merge(cultarget: value.to_s)
end

#to(value) ⇒ self

The timestamp to end enumerating.

Parameters:

  • value (Time)

Returns:

  • (self)


70
71
72
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 70

def to(value)
  merge(culto: value.iso8601)
end

#user(value) ⇒ self

Username of the CheckUser.

Parameters:

  • value (String)

Returns:

  • (self)


25
26
27
# File 'lib/mediawiktory/wikipedia/modules/checkuserlog.rb', line 25

def user(value)
  merge(culuser: value.to_s)
end