Module: MediaWiktory::Wikipedia::Modules::Abuselog
- Defined in:
- lib/mediawiktory/wikipedia/modules/abuselog.rb
Overview
Show events that were caught by one of the abuse filters.
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
-
#dir(value) ⇒ self
In which direction to enumerate:.
-
#end(value) ⇒ self
The timestamp to stop enumerating at.
-
#filter(*values) ⇒ self
Show only entries that were caught by a given filter ID.
-
#limit(value) ⇒ self
The maximum amount of entries to list.
-
#prop(*values) ⇒ self
Which properties to get.
-
#start(value) ⇒ self
The timestamp to start enumerating from.
-
#title(value) ⇒ self
Show only entries occurring on a given page.
-
#user(value) ⇒ self
Show only entries done by a given user or IP address.
Instance Method Details
#dir(value) ⇒ self
In which direction to enumerate:
41 42 43 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 41 def dir(value) _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}" end |
#end(value) ⇒ self
The timestamp to stop enumerating at.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 33 def end(value) merge(aflend: value.iso8601) end |
#filter(*values) ⇒ self
Show only entries that were caught by a given filter ID.
70 71 72 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 70 def filter(*values) values.inject(self) { |res, val| res._filter(val) } end |
#limit(value) ⇒ self
The maximum amount of entries to list.
83 84 85 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 83 def limit(value) merge(afllimit: value.to_s) end |
#prop(*values) ⇒ self
Which properties to get.
91 92 93 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 91 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#start(value) ⇒ self
The timestamp to start enumerating from.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 25 def start(value) merge(aflstart: value.iso8601) end |
#title(value) ⇒ self
Show only entries occurring on a given page.
62 63 64 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 62 def title(value) merge(afltitle: value.to_s) end |
#user(value) ⇒ self
Show only entries done by a given user or IP address.
54 55 56 |
# File 'lib/mediawiktory/wikipedia/modules/abuselog.rb', line 54 def user(value) merge(afluser: value.to_s) end |