class MediaWiktory::Wikipedia::Actions::Setglobalaccountstatus
Set a global user's status.
Usage:
“`ruby api.setglobalaccountstatus.user(value).perform # returns string with raw output # or api.setglobalaccountstatus.user(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/setglobalaccountstatus.rb, line 39 def _locked(value) defined?(super) && super || ["lock", "unlock"].include?(value.to_s) && merge(locked: value.to_s) end
Change whether this user is locked or not.
@param value [String] One of “lock”, “unlock”. @return [self]
# File lib/mediawiktory/wikipedia/actions/setglobalaccountstatus.rb, line 34 def locked(value) _locked(value) or fail ArgumentError, "Unknown value for locked: #{value}" end
Reason for changing the user's status.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/setglobalaccountstatus.rb, line 60 def reason(value) merge(reason: value.to_s) end
Optional MD5 of the expected current <username>:<hidden>:<locked>, to detect edit conflicts. Set <locked> to 1 for locked, 0 for unlocked.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/setglobalaccountstatus.rb, line 68 def statecheck(value) merge(statecheck: value.to_s) end
A “setglobalaccountstatus” token retrieved from action=query&meta=tokens
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/setglobalaccountstatus.rb, line 76 def token(value) merge(token: value.to_s) end
User to change the status of.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/setglobalaccountstatus.rb, line 26 def user(value) merge(user: value.to_s) end