Module: MediaWiktory::Wikipedia::Modules::Filearchive
- Defined in:
- lib/mediawiktory/wikipedia/modules/filearchive.rb
Overview
Enumerate all deleted files sequentially.
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.
-
#dir(value) ⇒ self
The direction in which to list.
-
#from(value) ⇒ self
The image title to start enumerating from.
-
#limit(value) ⇒ self
How many images to return in total.
-
#prefix(value) ⇒ self
Search for all image titles that begin with this value.
-
#prop(*values) ⇒ self
Which image information to get:.
-
#sha1(value) ⇒ self
SHA1 hash of image.
-
#sha1base36(value) ⇒ self
SHA1 hash of image in base 36 (used in MediaWiki).
-
#to(value) ⇒ self
The image title to stop enumerating at.
Instance Method Details
#continue(value) ⇒ self
When more results are available, use this to continue.
99 100 101 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 99 def continue(value) merge(facontinue: value.to_s) end |
#dir(value) ⇒ self
The direction in which to list.
49 50 51 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 49 def dir(value) _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}" end |
#from(value) ⇒ self
The image title to start enumerating from.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 25 def from(value) merge(fafrom: value.to_s) end |
#limit(value) ⇒ self
How many images to return in total.
91 92 93 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 91 def limit(value) merge(falimit: value.to_s) end |
#prefix(value) ⇒ self
Search for all image titles that begin with this value.
41 42 43 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 41 def prefix(value) merge(faprefix: value.to_s) end |
#prop(*values) ⇒ self
Which image information to get:
78 79 80 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 78 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#sha1(value) ⇒ self
SHA1 hash of image. Overrides fasha1base36.
62 63 64 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 62 def sha1(value) merge(fasha1: value.to_s) end |
#sha1base36(value) ⇒ self
SHA1 hash of image in base 36 (used in MediaWiki).
70 71 72 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 70 def sha1base36(value) merge(fasha1base36: value.to_s) end |
#to(value) ⇒ self
The image title to stop enumerating at.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/filearchive.rb', line 33 def to(value) merge(fato: value.to_s) end |