Class: MediaWiktory::Wikipedia::Actions::Zeroconfig
- Defined in:
- lib/mediawiktory/wikipedia/actions/zeroconfig.rb
Overview
Get configuration of the Zero extension.
Usage:
api.zeroconfig.type(value).perform # returns string with raw output
# or
api.zeroconfig.type(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
-
#agent(value) ⇒ self
When setting type to message, include a source agent value as well.
-
#type(value) ⇒ self
What kind of Zero info is needed:.
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
#agent(value) ⇒ self
When setting type to message, include a source agent value as well.
39 40 41 |
# File 'lib/mediawiktory/wikipedia/actions/zeroconfig.rb', line 39 def agent(value) merge(agent: value.to_s) end |
#type(value) ⇒ self
What kind of Zero info is needed:
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/zeroconfig.rb', line 26 def type(value) _type(value) or fail ArgumentError, "Unknown value for type: #{value}" end |