Module: MediaWiktory::Wikipedia::Modules::GWblistentityusage
- Defined in:
- lib/mediawiktory/wikipedia/modules/g-wblistentityusage.rb
Overview
Returns all pages that use the given entity IDs. Generator module: for fetching pages corresponding to request.
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
-
#aspect(*values) ⇒ self
Only return entity IDs that used this aspect.
-
#continue(value) ⇒ self
When more results are available, use this to continue.
-
#entities(*values) ⇒ self
Entities that have been used.
-
#limit(value) ⇒ self
How many entity usages to return.
Instance Method Details
#aspect(*values) ⇒ self
Only return entity IDs that used this aspect.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/g-wblistentityusage.rb', line 25 def aspect(*values) values.inject(self) { |res, val| res._aspect(val) or fail ArgumentError, "Unknown value for aspect: #{val}" } end |
#continue(value) ⇒ self
When more results are available, use this to continue.
59 60 61 |
# File 'lib/mediawiktory/wikipedia/modules/g-wblistentityusage.rb', line 59 def continue(value) merge(gwbeucontinue: value.to_s) end |
#entities(*values) ⇒ self
Entities that have been used.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/modules/g-wblistentityusage.rb', line 38 def entities(*values) values.inject(self) { |res, val| res._entities(val) } end |
#limit(value) ⇒ self
How many entity usages to return.
51 52 53 |
# File 'lib/mediawiktory/wikipedia/modules/g-wblistentityusage.rb', line 51 def limit(value) merge(gwbeulimit: value.to_s) end |