Class: MediaWiktory::Wikipedia::Actions::Compare
- Defined in:
- lib/mediawiktory/wikipedia/actions/compare.rb
Overview
Get the difference between 2 pages.
Usage:
api.compare.fromtitle(value).perform # returns string with raw output
# or
api.compare.fromtitle(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
-
#fromid(value) ⇒ self
First page ID to compare.
-
#fromrev(value) ⇒ self
First revision to compare.
-
#fromtitle(value) ⇒ self
First title to compare.
-
#toid(value) ⇒ self
Second page ID to compare.
-
#torev(value) ⇒ self
Second revision to compare.
-
#totitle(value) ⇒ self
Second title to compare.
Methods inherited from Get
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
#fromid(value) ⇒ self
First page ID to compare.
34 35 36 |
# File 'lib/mediawiktory/wikipedia/actions/compare.rb', line 34 def fromid(value) merge(fromid: value.to_s) end |
#fromrev(value) ⇒ self
First revision to compare.
42 43 44 |
# File 'lib/mediawiktory/wikipedia/actions/compare.rb', line 42 def fromrev(value) merge(fromrev: value.to_s) end |
#fromtitle(value) ⇒ self
First title to compare.
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/compare.rb', line 26 def fromtitle(value) merge(fromtitle: value.to_s) end |
#toid(value) ⇒ self
Second page ID to compare.
58 59 60 |
# File 'lib/mediawiktory/wikipedia/actions/compare.rb', line 58 def toid(value) merge(toid: value.to_s) end |
#torev(value) ⇒ self
Second revision to compare.
66 67 68 |
# File 'lib/mediawiktory/wikipedia/actions/compare.rb', line 66 def torev(value) merge(torev: value.to_s) end |
#totitle(value) ⇒ self
Second title to compare.
50 51 52 |
# File 'lib/mediawiktory/wikipedia/actions/compare.rb', line 50 def totitle(value) merge(totitle: value.to_s) end |