Class: MediaWiktory::Wikipedia::Actions::Feedwatchlist
- Defined in:
- lib/mediawiktory/wikipedia/actions/feedwatchlist.rb
Overview
Returns a watchlist feed.
Usage:
api.feedwatchlist.feedformat(value).perform # returns string with raw output
# or
api.feedwatchlist.feedformat(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
-
#allrev ⇒ self
Include multiple revisions of the same page within given timeframe.
-
#feedformat(value) ⇒ self
The format of the feed.
-
#hours(value) ⇒ self
List pages modified within this many hours from now.
-
#linktosections ⇒ self
Link directly to changed sections if possible.
-
#wlexcludeuser(value) ⇒ self
Don't list changes by this user.
-
#wlowner(value) ⇒ self
Used along with token to access a different user's watchlist.
-
#wlshow(*values) ⇒ self
Show only items that meet these criteria.
-
#wltoken(value) ⇒ self
A security token (available in the user's preferences) to allow access to another user's watchlist.
-
#wltype(*values) ⇒ self
Which types of changes to show:.
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
#allrev ⇒ self
Include multiple revisions of the same page within given timeframe.
53 54 55 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 53 def allrev() merge(allrev: 'true') end |
#feedformat(value) ⇒ self
The format of the feed.
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 26 def feedformat(value) _feedformat(value) or fail ArgumentError, "Unknown value for feedformat: #{value}" end |
#hours(value) ⇒ self
List pages modified within this many hours from now.
39 40 41 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 39 def hours(value) merge(hours: value.to_s) end |
#linktosections ⇒ self
Link directly to changed sections if possible.
46 47 48 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 46 def linktosections() merge(linktosections: 'true') end |
#wlexcludeuser(value) ⇒ self
Don't list changes by this user.
103 104 105 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 103 def wlexcludeuser(value) merge(wlexcludeuser: value.to_s) end |
#wlowner(value) ⇒ self
Used along with token to access a different user's watchlist.
61 62 63 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 61 def wlowner(value) merge(wlowner: value.to_s) end |
#wlshow(*values) ⇒ self
Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set show=minor|!anon.
77 78 79 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 77 def wlshow(*values) values.inject(self) { |res, val| res._wlshow(val) or fail ArgumentError, "Unknown value for wlshow: #{val}" } end |
#wltoken(value) ⇒ self
A security token (available in the user's preferences) to allow access to another user's watchlist.
69 70 71 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 69 def wltoken(value) merge(wltoken: value.to_s) end |
#wltype(*values) ⇒ self
Which types of changes to show:
90 91 92 |
# File 'lib/mediawiktory/wikipedia/actions/feedwatchlist.rb', line 90 def wltype(*values) values.inject(self) { |res, val| res._wltype(val) or fail ArgumentError, "Unknown value for wltype: #{val}" } end |