Class: MediaWiktory::Wikipedia::Actions::Setnotificationtimestamp
- Defined in:
- lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb
Overview
Update the notification timestamp for watched pages.
Usage:
api..entirewatchlist(value).perform # returns string with raw output
# or
api..entirewatchlist(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
-
#continue(value) ⇒ self
When more results are available, use this to continue.
-
#converttitles ⇒ self
Convert titles to other variants if necessary.
-
#entirewatchlist ⇒ self
Work on all watched pages.
-
#generator(value) ⇒ self
Get the list of pages to work on by executing the specified query module.
-
#newerthanrevid(value) ⇒ self
Revision to set the notification timestamp newer than (one page only).
-
#pageids(*values) ⇒ self
A list of page IDs to work on.
-
#redirects ⇒ self
Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.
-
#revids(*values) ⇒ self
A list of revision IDs to work on.
-
#timestamp(value) ⇒ self
Timestamp to which to set the notification timestamp.
-
#titles(*values) ⇒ self
A list of titles to work on.
-
#token(value) ⇒ self
A "csrf" token retrieved from action=query&meta=tokens.
-
#torevid(value) ⇒ self
Revision to set the notification timestamp to (one page only).
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
#continue(value) ⇒ self
When more results are available, use this to continue.
57 58 59 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 57 def continue(value) merge(continue: value.to_s) end |
#converttitles ⇒ self
Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan, iu, kk, ku, shi, sr, tg, uz and zh.
167 168 169 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 167 def converttitles() merge(converttitles: 'true') end |
#entirewatchlist ⇒ self
Work on all watched pages.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 25 def entirewatchlist() merge(entirewatchlist: 'true') end |
#generator(value) ⇒ self
Get the list of pages to work on by executing the specified query module.
148 149 150 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 148 def generator(value) _generator(value) or fail ArgumentError, "Unknown value for generator: #{value}" end |
#newerthanrevid(value) ⇒ self
Revision to set the notification timestamp newer than (one page only).
49 50 51 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 49 def newerthanrevid(value) merge(newerthanrevid: value.to_s) end |
#pageids(*values) ⇒ self
A list of page IDs to work on.
78 79 80 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 78 def pageids(*values) values.inject(self) { |res, val| res._pageids(val) } end |
#redirects ⇒ self
Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.
160 161 162 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 160 def redirects() merge(redirects: 'true') end |
#revids(*values) ⇒ self
A list of revision IDs to work on.
91 92 93 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 91 def revids(*values) values.inject(self) { |res, val| res._revids(val) } end |
#timestamp(value) ⇒ self
Timestamp to which to set the notification timestamp.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 33 def (value) merge(timestamp: value.iso8601) end |
#titles(*values) ⇒ self
A list of titles to work on.
65 66 67 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 65 def titles(*values) values.inject(self) { |res, val| res._titles(val) } end |
#token(value) ⇒ self
A "csrf" token retrieved from action=query&meta=tokens
175 176 177 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 175 def token(value) merge(token: value.to_s) end |
#torevid(value) ⇒ self
Revision to set the notification timestamp to (one page only).
41 42 43 |
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 41 def torevid(value) merge(torevid: value.to_s) end |