Module: MediaWiktory::Wikipedia::Modules::Stashimageinfo
- Defined in:
- lib/mediawiktory/wikipedia/modules/stashimageinfo.rb
Overview
Returns file information for stashed files.
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
-
#filekey(*values) ⇒ self
Key that identifies a previous upload that was stashed temporarily.
-
#prop(*values) ⇒ self
Which file information to get:.
-
#sessionkey(*values) ⇒ self
Alias for siifilekey, for backward compatibility.
-
#urlheight(value) ⇒ self
Similar to siiurlwidth.
-
#urlparam(value) ⇒ self
A handler specific parameter string.
-
#urlwidth(value) ⇒ self
If siiprop=url is set, a URL to an image scaled to this width will be returned.
Instance Method Details
#filekey(*values) ⇒ self
Key that identifies a previous upload that was stashed temporarily.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/stashimageinfo.rb', line 25 def filekey(*values) values.inject(self) { |res, val| res._filekey(val) } end |
#prop(*values) ⇒ self
Which file information to get:
51 52 53 |
# File 'lib/mediawiktory/wikipedia/modules/stashimageinfo.rb', line 51 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#sessionkey(*values) ⇒ self
Alias for siifilekey, for backward compatibility.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/modules/stashimageinfo.rb', line 38 def sessionkey(*values) values.inject(self) { |res, val| res._sessionkey(val) } end |
#urlheight(value) ⇒ self
Similar to siiurlwidth.
72 73 74 |
# File 'lib/mediawiktory/wikipedia/modules/stashimageinfo.rb', line 72 def urlheight(value) merge(siiurlheight: value.to_s) end |
#urlparam(value) ⇒ self
A handler specific parameter string. For example, PDFs might use page15-100px. siiurlwidth must be used and be consistent with siiurlparam.
80 81 82 |
# File 'lib/mediawiktory/wikipedia/modules/stashimageinfo.rb', line 80 def urlparam(value) merge(siiurlparam: value.to_s) end |
#urlwidth(value) ⇒ self
If siiprop=url is set, a URL to an image scaled to this width will be returned. For performance reasons if this option is used, no more than 50 scaled images will be returned.
64 65 66 |
# File 'lib/mediawiktory/wikipedia/modules/stashimageinfo.rb', line 64 def urlwidth(value) merge(siiurlwidth: value.to_s) end |