Module: MediaWiktory::Wikipedia::Modules::Contributors
- Defined in:
- lib/mediawiktory/wikipedia/modules/contributors.rb
Overview
Get the list of logged-in contributors and the count of anonymous contributors to a page.
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
-
#continue(value) ⇒ self
When more results are available, use this to continue.
-
#excludegroup(*values) ⇒ self
Exclude users in the given groups.
-
#excluderights(*values) ⇒ self
Exclude users having the given rights.
-
#group(*values) ⇒ self
Only include users in the given groups.
-
#limit(value) ⇒ self
How many contributors to return.
-
#rights(*values) ⇒ self
Only include users having the given rights.
Instance Method Details
#continue(value) ⇒ self
When more results are available, use this to continue.
85 86 87 |
# File 'lib/mediawiktory/wikipedia/modules/contributors.rb', line 85 def continue(value) merge(pccontinue: value.to_s) end |
#excludegroup(*values) ⇒ self
Exclude users in the given groups. Does not include implicit or auto-promoted groups like *, user, or autoconfirmed.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/modules/contributors.rb', line 38 def excludegroup(*values) values.inject(self) { |res, val| res._excludegroup(val) or fail ArgumentError, "Unknown value for excludegroup: #{val}" } end |
#excluderights(*values) ⇒ self
Exclude users having the given rights. Does not include rights granted by implicit or auto-promoted groups like *, user, or autoconfirmed.
64 65 66 |
# File 'lib/mediawiktory/wikipedia/modules/contributors.rb', line 64 def excluderights(*values) values.inject(self) { |res, val| res._excluderights(val) or fail ArgumentError, "Unknown value for excluderights: #{val}" } end |
#group(*values) ⇒ self
Only include users in the given groups. Does not include implicit or auto-promoted groups like *, user, or autoconfirmed.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/contributors.rb', line 25 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 contributors to return.
77 78 79 |
# File 'lib/mediawiktory/wikipedia/modules/contributors.rb', line 77 def limit(value) merge(pclimit: value.to_s) end |
#rights(*values) ⇒ self
Only include users having the given rights. Does not include rights granted by implicit or auto-promoted groups like *, user, or autoconfirmed.
51 52 53 |
# File 'lib/mediawiktory/wikipedia/modules/contributors.rb', line 51 def rights(*values) values.inject(self) { |res, val| res._rights(val) or fail ArgumentError, "Unknown value for rights: #{val}" } end |