Module: MediaWiktory::Wikipedia::Modules::Globaluserinfo
- Defined in:
- lib/mediawiktory/wikipedia/modules/globaluserinfo.rb
Overview
Show information about a global user.
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
-
#prop(*values) ⇒ self
Which properties to get:.
-
#user(value) ⇒ self
User to get information about.
Instance Method Details
#prop(*values) ⇒ self
Which properties to get:
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/globaluserinfo.rb', line 33 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#user(value) ⇒ self
User to get information about. Defaults to the current user.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/globaluserinfo.rb', line 25 def user(value) merge(guiuser: value.to_s) end |