Class: MediaWiktory::Wikipedia::Actions::Help
- Defined in:
- lib/mediawiktory/wikipedia/actions/help.rb
Overview
Display help for the specified modules.
Usage:
api.help.modules(value).perform # returns string with raw output
# or
api.help.modules(value).response # returns output parsed and wrapped into Response object
See Base for generic explanation of working with MediaWiki actions and Response for working with action responses.
All action's parameters are documented as its public methods, see below.
Instance Method Summary collapse
-
#modules(*values) ⇒ self
Modules to display help for (values of the action and format parameters, or main).
-
#recursivesubmodules ⇒ self
Include help for submodules recursively.
-
#submodules ⇒ self
Include help for submodules of the named module.
-
#toc ⇒ self
Include a table of contents in the HTML output.
-
#wrap ⇒ self
Wrap the output in a standard API response structure.
Methods inherited from Get
Methods inherited from Base
#inspect, #merge, #name, #perform, #response, #to_h, #to_param, #to_url
Methods included from GlobalParams
#assert, #assertuser, #centralauthtoken, #curtimestamp, #errorformat, #errorlang, #errorsuselocal, #format, #maxage, #maxlag, #origin, #requestid, #responselanginfo, #servedby, #smaxage, #uselang
Instance Method Details
#modules(*values) ⇒ self
Modules to display help for (values of the action and format parameters, or main). Can specify submodules with a +.
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/help.rb', line 26 def modules(*values) values.inject(self) { |res, val| res._modules(val) } end |
#recursivesubmodules ⇒ self
Include help for submodules recursively.
45 46 47 |
# File 'lib/mediawiktory/wikipedia/actions/help.rb', line 45 def recursivesubmodules() merge(recursivesubmodules: 'true') end |
#submodules ⇒ self
Include help for submodules of the named module.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/actions/help.rb', line 38 def submodules() merge(submodules: 'true') end |
#toc ⇒ self
Include a table of contents in the HTML output.
59 60 61 |
# File 'lib/mediawiktory/wikipedia/actions/help.rb', line 59 def toc() merge(toc: 'true') end |
#wrap ⇒ self
Wrap the output in a standard API response structure.
52 53 54 |
# File 'lib/mediawiktory/wikipedia/actions/help.rb', line 52 def wrap() merge(wrap: 'true') end |