class MediaWiktory::Wikipedia::Actions::Mergehistory
Merge page histories.
Usage:
“`ruby api.mergehistory.from(value).perform # returns string with raw output # or api.mergehistory.from(value).response # returns output parsed and wrapped into Response
object “`
See {Base} for generic explanation of working with MediaWiki actions and {MediaWiktory::Wikipedia::Response} for working with action responses.
All action's parameters are documented as its public methods, see below.
Public Instance Methods
Title of the page from which history will be merged. Cannot be used together with fromid.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 26 def from(value) merge(from: value.to_s) end
Page ID of the page from which history will be merged. Cannot be used together with from.
@param value [Integer] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 34 def fromid(value) merge(fromid: value.to_s) end
Reason for the history merge.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 66 def reason(value) merge(reason: value.to_s) end
Timestamp up to which revisions will be moved from the source page's history to the destination page's history. If omitted, the entire page history of the source page will be merged into the destination page.
@param value [Time] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 58 def timestamp(value) merge(timestamp: value.iso8601) end
Title of the page to which history will be merged. Cannot be used together with toid.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 42 def to(value) merge(to: value.to_s) end
Page ID of the page to which history will be merged. Cannot be used together with to.
@param value [Integer] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 50 def toid(value) merge(toid: value.to_s) end
A “csrf” token retrieved from action=query&meta=tokens
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/mergehistory.rb, line 74 def token(value) merge(token: value.to_s) end