Module: MediaWiktory::Wikipedia::Modules::Globalallusers
- Defined in:
- lib/mediawiktory/wikipedia/modules/globalallusers.rb
Overview
Enumerate all global users.
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
Direction to sort in.
-
#excludegroup(*values) ⇒ self
Exclude users in given global groups.
-
#from(value) ⇒ self
The user name to start enumerating from.
-
#group(*values) ⇒ self
Limit users to given global groups.
-
#limit(value) ⇒ self
How many total user names to return.
-
#prefix(value) ⇒ self
Search for all users that begin with this value.
-
#prop(*values) ⇒ self
What pieces of information to include:.
-
#to(value) ⇒ self
The user name to stop enumerating at.
Instance Method Details
#dir(value) ⇒ self
Direction to sort in.
49 50 51 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 49 def dir(value) _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}" end |
#excludegroup(*values) ⇒ self
Exclude users in given global groups.
75 76 77 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 75 def excludegroup(*values) values.inject(self) { |res, val| res._excludegroup(val) or fail ArgumentError, "Unknown value for excludegroup: #{val}" } end |
#from(value) ⇒ self
The user name to start enumerating from.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 25 def from(value) merge(agufrom: value.to_s) end |
#group(*values) ⇒ self
Limit users to given global groups.
62 63 64 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 62 def group(*values) values.inject(self) { |res, val| res._group(val) or fail ArgumentError, "Unknown value for group: #{val}" } end |
#limit(value) ⇒ self
How many total user names to return.
101 102 103 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 101 def limit(value) merge(agulimit: value.to_s) end |
#prefix(value) ⇒ self
Search for all users that begin with this value.
41 42 43 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 41 def prefix(value) merge(aguprefix: value.to_s) end |
#prop(*values) ⇒ self
What pieces of information to include:
88 89 90 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 88 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#to(value) ⇒ self
The user name to stop enumerating at.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/globalallusers.rb', line 33 def to(value) merge(aguto: value.to_s) end |