module MediaWiktory::Wikipedia::Modules::Deletedrevs

List deleted revisions.

The “submodule” (MediaWiki API term) is included in action after setting some param, providing additional tweaking for this param. Example (for {MediaWiktory::Wikipedia::Actions::Query} and its submodules):

“`ruby 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.

Public Instance Methods

_dir(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 46
def _dir(value)
  defined?(super) && super || ["newer", "older"].include?(value.to_s) && merge(drdir: value.to_s)
end
_namespace(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 90
def _namespace(value)
  defined?(super) && super || ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "446", "447", "710", "711", "828", "829", "2300", "2301", "2302", "2303"].include?(value.to_s) && merge(drnamespace: value.to_s)
end
_prop(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 127
def _prop(value)
  defined?(super) && super || ["revid", "parentid", "user", "userid", "comment", "parsedcomment", "minor", "len", "sha1", "content", "token", "tags"].include?(value.to_s) && merge(drprop: value.to_s, replace: false)
end
continue(value) click to toggle source

When more results are available, use this to continue.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 143
def continue(value)
  merge(drcontinue: value.to_s)
end
dir(value) click to toggle source

In which direction to enumerate:

@param value [String] One of “newer” (List oldest first. Note: drstart has to be before drend), “older” (List newest first (default). Note: drstart has to be later than drend). @return [self]

# 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) click to toggle source

The timestamp to stop enumerating at.

@param value [Time] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 33
def end(value)
  merge(drend: value.iso8601)
end
excludeuser(value) click to toggle source

Don't list revisions by this user.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 114
def excludeuser(value)
  merge(drexcludeuser: value.to_s)
end
from(value) click to toggle source

Start listing at this title.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 54
def from(value)
  merge(drfrom: value.to_s)
end
limit(value) click to toggle source

The maximum amount of revisions to list.

@param value [Integer, “max”] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 135
def limit(value)
  merge(drlimit: value.to_s)
end
namespace(value) click to toggle source

Only list pages in this namespace.

@param value [String] One of “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “11”, “12”, “13”, “14”, “15”, “100”, “101”, “108”, “109”, “118”, “119”, “446”, “447”, “710”, “711”, “828”, “829”, “2300”, “2301”, “2302”, “2303”. @return [self]

# 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) click to toggle source

Search for all page titles that begin with this value.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 70
def prefix(value)
  merge(drprefix: value.to_s)
end
prop(*values) click to toggle source

Which properties to get:

@param values [Array<String>] Allowed values: “revid” (Adds the revision ID of the deleted revision), “parentid” (Adds the revision ID of the previous revision to the page), “user” (Adds the user who made the revision), “userid” (Adds the ID of the user who made the revision), “comment” (Adds the comment of the revision), “parsedcomment” (Adds the parsed comment of the revision), “minor” (Tags if the revision is minor), “len” (Adds the length (bytes) of the revision), “sha1” (Adds the SHA-1 (base 16) of the revision), “content” (Adds the content of the revision), “token” (Deprecated. Gives the edit token), “tags” (Tags for the revision). @return [self]

# 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) click to toggle source

The timestamp to start enumerating from.

@param value [Time] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 25
def start(value)
  merge(drstart: value.iso8601)
end
tag(value) click to toggle source

Only list revisions tagged with this tag.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 98
def tag(value)
  merge(drtag: value.to_s)
end
to(value) click to toggle source

Stop listing at this title.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 62
def to(value)
  merge(drto: value.to_s)
end
unique() click to toggle source

List only one revision for each page.

@return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 77
def unique()
  merge(drunique: 'true')
end
user(value) click to toggle source

Only list revisions by this user.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/deletedrevs.rb, line 106
def user(value)
  merge(druser: value.to_s)
end