Module: MediaWiktory::Wikipedia::Modules::Querypage
- Defined in:
- lib/mediawiktory/wikipedia/modules/querypage.rb
Overview
Get a list provided by a QueryPage-based special 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
-
#limit(value) ⇒ self
Number of results to return.
-
#offset(value) ⇒ self
When more results are available, use this to continue.
-
#page(value) ⇒ self
The name of the special page.
Instance Method Details
#limit(value) ⇒ self
Number of results to return.
46 47 48 |
# File 'lib/mediawiktory/wikipedia/modules/querypage.rb', line 46 def limit(value) merge(qplimit: value.to_s) end |
#offset(value) ⇒ self
When more results are available, use this to continue.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/modules/querypage.rb', line 38 def offset(value) merge(qpoffset: value.to_s) end |
#page(value) ⇒ self
The name of the special page. Note, this is case sensitive.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/querypage.rb', line 25 def page(value) _page(value) or fail ArgumentError, "Unknown value for page: #{value}" end |