Module: MediaWiktory::Wikipedia::Modules::Authmanagerinfo

Defined in:
lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb

Overview

Retrieve information about the current authentication status.

The "submodule" (MediaWiki API term) is included in action after setting some param, providing additional tweaking for this param. Example (for Actions::Query and its submodules):

api.query             # returns Actions::Query
   .prop(:revisions)  # adds prop=revisions to action URL, and includes Modules::Revisions into action
   .limit(10)         # method of Modules::Revisions, adds rvlimit=10 to URL

All submodule's parameters are documented as its public methods, see below.

Instance Method Summary collapse

Instance Method Details

#mergerequestfieldsself

Merge field information for all authentication requests into one array.

Returns:

  • (self)


45
46
47
# File 'lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb', line 45

def mergerequestfields()
  merge(amimergerequestfields: 'true')
end

#messageformat(value) ⇒ self

Format to use for returning messages.

Parameters:

  • value (String)

    One of "html", "wikitext", "raw", "none".

Returns:

  • (self)


53
54
55
# File 'lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb', line 53

def messageformat(value)
  _messageformat(value) or fail ArgumentError, "Unknown value for messageformat: #{value}"
end

#requestsfor(value) ⇒ self

Fetch information about the authentication requests needed for the specified authentication action.

Parameters:

  • value (String)

    One of "login", "login-continue", "create", "create-continue", "link", "link-continue", "change", "remove", "unlink".

Returns:

  • (self)


33
34
35
# File 'lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb', line 33

def requestsfor(value)
  _requestsfor(value) or fail ArgumentError, "Unknown value for requestsfor: #{value}"
end

#securitysensitiveoperation(value) ⇒ self

Test whether the user's current authentication status is sufficient for the specified security-sensitive operation.

Parameters:

  • value (String)

Returns:

  • (self)


25
26
27
# File 'lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb', line 25

def securitysensitiveoperation(value)
  merge(amisecuritysensitiveoperation: value.to_s)
end