class MediaWiktory::Wikipedia::Actions::Echomarkread

Mark notifications as read for the current user.

Usage:

“`ruby api.echomarkread.list(value).perform # returns string with raw output # or api.echomarkread.list(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

_list(value) click to toggle source

@private

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 31
def _list(value)
  merge(list: value.to_s, replace: false)
end
_sections(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 64
def _sections(value)
  defined?(super) && super || ["alert", "message"].include?(value.to_s) && merge(sections: value.to_s, replace: false)
end
_unreadlist(value) click to toggle source

@private

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 44
def _unreadlist(value)
  merge(unreadlist: value.to_s, replace: false)
end
all() click to toggle source

If set, marks all of a user's notifications as read.

@return [self]

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 51
def all()
  merge(all: 'true')
end
list(*values) click to toggle source

A list of notification IDs to mark as read.

@param values [Array<String>] @return [self]

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 26
def list(*values)
  values.inject(self) { |res, val| res._list(val) }
end
sections(*values) click to toggle source

A list of sections to mark as read.

@param values [Array<String>] Allowed values: “alert”, “message”. @return [self]

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 59
def sections(*values)
  values.inject(self) { |res, val| res._sections(val) or fail ArgumentError, "Unknown value for sections: #{val}" }
end
token(value) click to toggle source

A “csrf” token retrieved from action=query&meta=tokens

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 72
def token(value)
  merge(token: value.to_s)
end
unreadlist(*values) click to toggle source

A list of notification IDs to mark as unread.

@param values [Array<String>] @return [self]

# File lib/mediawiktory/wikipedia/actions/echomarkread.rb, line 39
def unreadlist(*values)
  values.inject(self) { |res, val| res._unreadlist(val) }
end