class MediaWiktory::Wikipedia::Actions::Deleteeducation

Delete Education Program objects.

Usage:

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

_ids(value) click to toggle source

@private

# File lib/mediawiktory/wikipedia/actions/deleteeducation.rb, line 31
def _ids(value)
  merge(ids: value.to_s, replace: false)
end
_type(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/actions/deleteeducation.rb, line 44
def _type(value)
  defined?(super) && super || ["org", "course"].include?(value.to_s) && merge(type: value.to_s)
end
comment(value) click to toggle source

Reason for this deletion, for the log.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/deleteeducation.rb, line 52
def comment(value)
  merge(comment: value.to_s)
end
ids(*values) click to toggle source

The IDs of the objects to delete.

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

# File lib/mediawiktory/wikipedia/actions/deleteeducation.rb, line 26
def ids(*values)
  values.inject(self) { |res, val| res._ids(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/deleteeducation.rb, line 60
def token(value)
  merge(token: value.to_s)
end
type(value) click to toggle source

Type of object to delete.

@param value [String] One of “org”, “course”. @return [self]

# File lib/mediawiktory/wikipedia/actions/deleteeducation.rb, line 39
def type(value)
  _type(value) or fail ArgumentError, "Unknown value for type: #{value}"
end