Class: MediaWiktory::Wikipedia::Actions::Mergehistory
- Defined in:
- lib/mediawiktory/wikipedia/actions/mergehistory.rb
Overview
Merge page histories.
Usage:
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 Response for working with action responses.
All action's parameters are documented as its public methods, see below.
Instance Method Summary collapse
-
#from(value) ⇒ self
Title of the page from which history will be merged.
-
#fromid(value) ⇒ self
Page ID of the page from which history will be merged.
-
#reason(value) ⇒ self
Reason for the history merge.
-
#timestamp(value) ⇒ self
Timestamp up to which revisions will be moved from the source page's history to the destination page's history.
-
#to(value) ⇒ self
Title of the page to which history will be merged.
-
#toid(value) ⇒ self
Page ID of the page to which history will be merged.
-
#token(value) ⇒ self
A "csrf" token retrieved from action=query&meta=tokens.
Methods inherited from Post
Methods inherited from Base
#inspect, #merge, #name, #perform, #response, #to_h, #to_param, #to_url
Methods included from GlobalParams
#assert, #assertuser, #centralauthtoken, #curtimestamp, #errorformat, #errorlang, #errorsuselocal, #format, #maxage, #maxlag, #origin, #requestid, #responselanginfo, #servedby, #smaxage, #uselang
Instance Method Details
#from(value) ⇒ self
Title of the page from which history will be merged. Cannot be used together with fromid.
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 26 def from(value) merge(from: value.to_s) end |
#fromid(value) ⇒ self
Page ID of the page from which history will be merged. Cannot be used together with from.
34 35 36 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 34 def fromid(value) merge(fromid: value.to_s) end |
#reason(value) ⇒ self
Reason for the history merge.
66 67 68 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 66 def reason(value) merge(reason: value.to_s) end |
#timestamp(value) ⇒ self
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.
58 59 60 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 58 def (value) merge(timestamp: value.iso8601) end |
#to(value) ⇒ self
Title of the page to which history will be merged. Cannot be used together with toid.
42 43 44 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 42 def to(value) merge(to: value.to_s) end |
#toid(value) ⇒ self
Page ID of the page to which history will be merged. Cannot be used together with to.
50 51 52 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 50 def toid(value) merge(toid: value.to_s) end |
#token(value) ⇒ self
A "csrf" token retrieved from action=query&meta=tokens
74 75 76 |
# File 'lib/mediawiktory/wikipedia/actions/mergehistory.rb', line 74 def token(value) merge(token: value.to_s) end |