Module: MediaWiktory::Wikipedia::Modules::Siteinfo
- Defined in:
- lib/mediawiktory/wikipedia/modules/siteinfo.rb
Overview
Return general information about the site.
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
-
#filteriw(value) ⇒ self
Return only local or only nonlocal entries of the interwiki map.
-
#inlanguagecode(value) ⇒ self
Language code for localised language names (best effort) and skin names.
-
#numberingroup ⇒ self
Lists the number of users in user groups.
-
#prop(*values) ⇒ self
Which information to get:.
-
#showalldb ⇒ self
List all database servers, not just the one lagging the most.
Instance Method Details
#filteriw(value) ⇒ self
Return only local or only nonlocal entries of the interwiki map.
38 39 40 |
# File 'lib/mediawiktory/wikipedia/modules/siteinfo.rb', line 38 def filteriw(value) _filteriw(value) or fail ArgumentError, "Unknown value for filteriw: #{value}" end |
#inlanguagecode(value) ⇒ self
Language code for localised language names (best effort) and skin names.
65 66 67 |
# File 'lib/mediawiktory/wikipedia/modules/siteinfo.rb', line 65 def inlanguagecode(value) merge(siinlanguagecode: value.to_s) end |
#numberingroup ⇒ self
Lists the number of users in user groups.
57 58 59 |
# File 'lib/mediawiktory/wikipedia/modules/siteinfo.rb', line 57 def numberingroup() merge(sinumberingroup: 'true') end |
#prop(*values) ⇒ self
Which information to get:
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/siteinfo.rb', line 25 def prop(*values) values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" } end |
#showalldb ⇒ self
List all database servers, not just the one lagging the most.
50 51 52 |
# File 'lib/mediawiktory/wikipedia/modules/siteinfo.rb', line 50 def showalldb() merge(sishowalldb: 'true') end |