class MediaWiktory::Wikipedia::Actions::Feedwatchlist
Returns a watchlist feed.
Usage:
“`ruby 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 {MediaWiktory::Wikipedia::Response} for working with action responses.
All action's parameters are documented as its public methods, see below.
Public Instance Methods
@private
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 31 def _feedformat(value) defined?(super) && super || ["rss", "atom"].include?(value.to_s) && merge(feedformat: value.to_s) end
@private
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 82 def _wlshow(value) defined?(super) && super || ["minor", "!minor", "bot", "!bot", "anon", "!anon", "patrolled", "!patrolled", "unread", "!unread"].include?(value.to_s) && merge(wlshow: value.to_s, replace: false) end
@private
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 95 def _wltype(value) defined?(super) && super || ["edit", "new", "log", "external", "categorize"].include?(value.to_s) && merge(wltype: value.to_s, replace: false) end
Include multiple revisions of the same page within given timeframe.
@return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 53 def allrev() merge(allrev: 'true') end
The format of the feed.
@param value [String] One of “rss”, “atom”. @return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 26 def feedformat(value) _feedformat(value) or fail ArgumentError, "Unknown value for feedformat: #{value}" end
List pages modified within this many hours from now.
@param value [Integer] @return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 39 def hours(value) merge(hours: value.to_s) end
Link directly to changed sections if possible.
@return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 46 def linktosections() merge(linktosections: 'true') end
Don't list changes by this user.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 103 def wlexcludeuser(value) merge(wlexcludeuser: value.to_s) end
Used along with token to access a different user's watchlist.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 61 def wlowner(value) merge(wlowner: value.to_s) end
Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set show=minor|!anon.
@param values [Array<String>] Allowed values: “minor”, “!minor”, “bot”, “!bot”, “anon”, “!anon”, “patrolled”, “!patrolled”, “unread”, “!unread”. @return [self]
# 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
A security token (available in the user's preferences) to allow access to another user's watchlist.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/feedwatchlist.rb, line 69 def wltoken(value) merge(wltoken: value.to_s) end
Which types of changes to show:
@param values [Array<String>] Allowed values: “edit” (Regular page edits), “new” (Page creations), “log” (Log entries), “external” (External changes), “categorize” (Category membership changes). @return [self]
# 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