Class: MediaWiktory::Wikipedia::Actions::Setnotificationtimestamp

Inherits:
Post
  • Object
show all
Defined in:
lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb

Overview

Update the notification timestamp for watched pages.

Usage:

api.setnotificationtimestamp.entirewatchlist(value).perform # returns string with raw output
# or
api.setnotificationtimestamp.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

Methods inherited from Post

#perform

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.

Parameters:

  • value (String)

Returns:

  • (self)


57
58
59
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 57

def continue(value)
  merge(continue: value.to_s)
end

#converttitlesself

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.

Returns:

  • (self)


167
168
169
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 167

def converttitles()
  merge(converttitles: 'true')
end

#entirewatchlistself

Work on all watched pages.

Returns:

  • (self)


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.

Parameters:

Returns:

  • (self)


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).

Parameters:

  • value (Integer)

Returns:

  • (self)


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.

Parameters:

  • values (Array<Integer>)

Returns:

  • (self)


78
79
80
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 78

def pageids(*values)
  values.inject(self) { |res, val| res._pageids(val) }
end

#redirectsself

Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.

Returns:

  • (self)


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.

Parameters:

  • values (Array<Integer>)

Returns:

  • (self)


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.

Parameters:

  • value (Time)

Returns:

  • (self)


33
34
35
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 33

def timestamp(value)
  merge(timestamp: value.iso8601)
end

#titles(*values) ⇒ self

A list of titles to work on.

Parameters:

  • values (Array<String>)

Returns:

  • (self)


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

Parameters:

  • value (String)

Returns:

  • (self)


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).

Parameters:

  • value (Integer)

Returns:

  • (self)


41
42
43
# File 'lib/mediawiktory/wikipedia/actions/setnotificationtimestamp.rb', line 41

def torevid(value)
  merge(torevid: value.to_s)
end