Module: MediaWiktory::Wikipedia::Modules::Abusefilters
- Defined in:
- lib/mediawiktory/wikipedia/modules/abusefilters.rb
Overview
Show details 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:.
-
#endid(value) ⇒ self
The filter ID to stop enumerating at.
-
#limit(value) ⇒ self
The maximum number of filters to list.
-
#prop(*values) ⇒ self
Which properties to get.
-
#show(*values) ⇒ self
Show only filters which meet these criteria.
-
#startid(value) ⇒ self
The filter ID to start enumerating from.
Instance Method Details
#dir(value) ⇒ self
In which direction to enumerate:
41 42 43 |
# File 'lib/mediawiktory/wikipedia/modules/abusefilters.rb', line 41 def dir(value) _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}" end |
#endid(value) ⇒ self
The filter ID to stop enumerating at.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/abusefilters.rb', line 33 def endid(value) merge(abfendid: value.to_s) end |
#limit(value) ⇒ self
The maximum number of filters to list.
67 68 69 |
# File 'lib/mediawiktory/wikipedia/modules/abusefilters.rb', line 67 def limit(value) merge(abflimit: value.to_s) end |
#prop(*values) ⇒ self
Which properties to get.
75 76 77 |
# File 'lib/mediawiktory/wikipedia/modules/abusefilters.rb', line 75 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#show(*values) ⇒ self
Show only filters which meet these criteria.
54 55 56 |
# File 'lib/mediawiktory/wikipedia/modules/abusefilters.rb', line 54 def show(*values) values.inject(self) { |res, val| res._show(val) or fail ArgumentError, "Unknown value for show: #{val}" } end |
#startid(value) ⇒ self
The filter ID to start enumerating from.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/abusefilters.rb', line 25 def startid(value) merge(abfstartid: value.to_s) end |