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
-
#mergerequestfields ⇒ self
Merge field information for all authentication requests into one array.
-
#messageformat(value) ⇒ self
Format to use for returning messages.
-
#requestsfor(value) ⇒ self
Fetch information about the authentication requests needed for the specified authentication action.
-
#securitysensitiveoperation(value) ⇒ self
Test whether the user's current authentication status is sufficient for the specified security-sensitive operation.
Instance Method Details
#mergerequestfields ⇒ self
Merge field information for all authentication requests into one array.
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.
53 54 55 |
# File 'lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb', line 53 def (value) (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.
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.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/authmanagerinfo.rb', line 25 def securitysensitiveoperation(value) merge(amisecuritysensitiveoperation: value.to_s) end |