class MediaWiktory::Wikipedia::Actions::Managetags
Perform management tasks relating to change tags.
Usage:
“`ruby api.managetags.operation(value).perform # returns string with raw output # or api.managetags.operation(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
@private
# File lib/mediawiktory/wikipedia/actions/managetags.rb, line 31 def _operation(value) defined?(super) && super || ["create", "delete", "activate", "deactivate"].include?(value.to_s) && merge(operation: value.to_s) end
Whether to ignore any warnings that are issued during the operation.
@return [self]
# File lib/mediawiktory/wikipedia/actions/managetags.rb, line 54 def ignorewarnings() merge(ignorewarnings: 'true') end
Which operation to perform:
@param value [String] One of “create” (Create a new change tag for manual use), “delete” (Remove a change tag from the database, including removing the tag from all revisions, recent change entries and log entries on which it is used), “activate” (Activate a change tag, allowing users to apply it manually), “deactivate” (Deactivate a change tag, preventing users from applying it manually). @return [self]
# File lib/mediawiktory/wikipedia/actions/managetags.rb, line 26 def operation(value) _operation(value) or fail ArgumentError, "Unknown value for operation: #{value}" end
An optional reason for creating, deleting, activating or deactivating the tag.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/managetags.rb, line 47 def reason(value) merge(reason: value.to_s) end
Tag
to create, delete, activate or deactivate. For tag creation, the tag must not exist. For tag deletion, the tag must exist. For tag activation, the tag must exist and not be in use by an extension. For tag deactivation, the tag must be currently active and manually defined.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/managetags.rb, line 39 def tag(value) merge(tag: value.to_s) end
A “csrf” token retrieved from action=query&meta=tokens
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/managetags.rb, line 75 def token(value) merge(token: value.to_s) end