Module: MediaWiktory::Wikipedia::Modules::Projectpages
- Defined in:
- lib/mediawiktory/wikipedia/modules/projectpages.rb
Overview
List all pages associated with one or more projects.
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
-
#assessments ⇒ self
Also return assessments for the pages returned.
-
#continue(value) ⇒ self
When more results are available, use this to continue.
-
#limit(value) ⇒ self
The maximum number of pages to return.
-
#projects(*values) ⇒ self
The projects to list pages for.
Instance Method Details
#assessments ⇒ self
Also return assessments for the pages returned.
24 25 26 |
# File 'lib/mediawiktory/wikipedia/modules/projectpages.rb', line 24 def assessments() merge(wppassessments: 'true') end |
#continue(value) ⇒ self
When more results are available, use this to continue.
53 54 55 |
# File 'lib/mediawiktory/wikipedia/modules/projectpages.rb', line 53 def continue(value) merge(wppcontinue: value.to_s) end |
#limit(value) ⇒ self
The maximum number of pages to return.
45 46 47 |
# File 'lib/mediawiktory/wikipedia/modules/projectpages.rb', line 45 def limit(value) merge(wpplimit: value.to_s) end |
#projects(*values) ⇒ self
The projects to list pages for. If this parameter is omitted, all projects will be included.
32 33 34 |
# File 'lib/mediawiktory/wikipedia/modules/projectpages.rb', line 32 def projects(*values) values.inject(self) { |res, val| res._projects(val) } end |