class MediaWiktory::Wikipedia::Actions::Unblock

Unblock a user.

Usage:

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

_tags(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/actions/unblock.rb, line 63
def _tags(value)
  defined?(super) && super || ["ProveIt edit", "WPCleaner", "huggle", "large plot addition"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
end
id(value) click to toggle source

ID of the block to unblock (obtained through list=blocks). Cannot be used together with user or userid.

@param value [Integer] @return [self]

# File lib/mediawiktory/wikipedia/actions/unblock.rb, line 26
def id(value)
  merge(id: value.to_s)
end
reason(value) click to toggle source

Reason for unblock.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/unblock.rb, line 50
def reason(value)
  merge(reason: value.to_s)
end
tags(*values) click to toggle source

Change tags to apply to the entry in the block log.

@param values [Array<String>] Allowed values: “ProveIt edit”, “WPCleaner”, “huggle”, “large plot addition”. @return [self]

# File lib/mediawiktory/wikipedia/actions/unblock.rb, line 58
def tags(*values)
  values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{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/unblock.rb, line 71
def token(value)
  merge(token: value.to_s)
end
user(value) click to toggle source

Username, IP address or IP address range to unblock. Cannot be used together with id or userid.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/unblock.rb, line 34
def user(value)
  merge(user: value.to_s)
end
userid(value) click to toggle source

User ID to unblock. Cannot be used together with id or user.

@param value [Integer] @return [self]

# File lib/mediawiktory/wikipedia/actions/unblock.rb, line 42
def userid(value)
  merge(userid: value.to_s)
end