Module: MediaWiktory::Wikipedia::Modules::Deletedrevs
- Defined in:
- lib/mediawiktory/wikipedia/modules/deletedrevs.rb
Overview
List deleted revisions.
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
In which direction to enumerate:.
-
#end(value) ⇒ self
The timestamp to stop enumerating at.
-
#excludeuser(value) ⇒ self
Don't list revisions by this user.
-
#from(value) ⇒ self
Start listing at this title.
-
#limit(value) ⇒ self
The maximum amount of revisions to list.
-
#namespace(value) ⇒ self
Only list pages in this namespace.
-
#prefix(value) ⇒ self
Search for all page titles that begin with this value.
-
#prop(*values) ⇒ self
Which properties to get:.
-
#start(value) ⇒ self
The timestamp to start enumerating from.
-
#tag(value) ⇒ self
Only list revisions tagged with this tag.
-
#to(value) ⇒ self
Stop listing at this title.
-
#unique ⇒ self
List only one revision for each page.
-
#user(value) ⇒ self
Only list revisions by this user.
Instance Method Details
#continue(value) ⇒ self
When more results are available, use this to continue.
143 144 145 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 143 def continue(value) merge(drcontinue: value.to_s) end |
#dir(value) ⇒ self
In which direction to enumerate:
41 42 43 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 41 def dir(value) _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}" end |
#end(value) ⇒ self
The timestamp to stop enumerating at.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 33 def end(value) merge(drend: value.iso8601) end |
#excludeuser(value) ⇒ self
Don't list revisions by this user.
114 115 116 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 114 def excludeuser(value) merge(drexcludeuser: value.to_s) end |
#from(value) ⇒ self
Start listing at this title.
54 55 56 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 54 def from(value) merge(drfrom: value.to_s) end |
#limit(value) ⇒ self
The maximum amount of revisions to list.
135 136 137 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 135 def limit(value) merge(drlimit: value.to_s) end |
#namespace(value) ⇒ self
Only list pages in this namespace.
85 86 87 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 85 def namespace(value) _namespace(value) or fail ArgumentError, "Unknown value for namespace: #{value}" end |
#prefix(value) ⇒ self
Search for all page titles that begin with this value.
70 71 72 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 70 def prefix(value) merge(drprefix: value.to_s) end |
#prop(*values) ⇒ self
Which properties to get:
122 123 124 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 122 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#start(value) ⇒ self
The timestamp to start enumerating from.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 25 def start(value) merge(drstart: value.iso8601) end |
#tag(value) ⇒ self
Only list revisions tagged with this tag.
98 99 100 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 98 def tag(value) merge(drtag: value.to_s) end |
#to(value) ⇒ self
Stop listing at this title.
62 63 64 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 62 def to(value) merge(drto: value.to_s) end |
#unique ⇒ self
List only one revision for each page.
77 78 79 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 77 def unique() merge(drunique: 'true') end |
#user(value) ⇒ self
Only list revisions by this user.
106 107 108 |
# File 'lib/mediawiktory/wikipedia/modules/deletedrevs.rb', line 106 def user(value) merge(druser: value.to_s) end |