Module: MediaWiktory::Wikipedia::Modules::Pageimages
- Defined in:
- lib/mediawiktory/wikipedia/modules/pageimages.rb
Overview
Returns information about images on the page, such as thumbnail and presence of photos.
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.
-
#license(value) ⇒ self
Limit page images to a certain license type.
-
#limit(value) ⇒ self
Properties of how many pages to return.
-
#prop(*values) ⇒ self
Which information to return:.
-
#thumbsize(value) ⇒ self
Maximum thumbnail dimension.
Instance Method Details
#continue(value) ⇒ self
When more results are available, use this to continue.
67 68 69 |
# File 'lib/mediawiktory/wikipedia/modules/pageimages.rb', line 67 def continue(value) merge(picontinue: value.to_s) end |
#license(value) ⇒ self
Limit page images to a certain license type
54 55 56 |
# File 'lib/mediawiktory/wikipedia/modules/pageimages.rb', line 54 def license(value) _license(value) or fail ArgumentError, "Unknown value for license: #{value}" end |
#limit(value) ⇒ self
Properties of how many pages to return.
46 47 48 |
# File 'lib/mediawiktory/wikipedia/modules/pageimages.rb', line 46 def limit(value) merge(pilimit: value.to_s) end |
#prop(*values) ⇒ self
Which information to return:
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/pageimages.rb', line 25 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#thumbsize(value) ⇒ self
Maximum thumbnail dimension.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/modules/pageimages.rb', line 38 def thumbsize(value) merge(pithumbsize: value.to_s) end |