module MediaWiktory::Wikipedia::Modules::Featureusage
Get a summary of logged API feature usages for a user agent.
The “submodule” (MediaWiki API term) is included in action after setting some param, providing additional tweaking for this param. Example (for {MediaWiktory::Wikipedia::Actions::Query} and its submodules):
“`ruby 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.
Public Instance Methods
_features(value)
click to toggle source
@private
# File lib/mediawiktory/wikipedia/modules/featureusage.rb, line 54 def _features(value) merge(afufeatures: value.to_s, replace: false) end
agent(value)
click to toggle source
User agent to query. If not specified, the agent in the request will be queried.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/modules/featureusage.rb, line 41 def agent(value) merge(afuagent: value.to_s) end
end(value)
click to toggle source
End of date range to query.
@param value [Time] @return [self]
# File lib/mediawiktory/wikipedia/modules/featureusage.rb, line 33 def end(value) merge(afuend: value.iso8601) end
features(*values)
click to toggle source
If specified, return details on only these features.
@param values [Array<String>] @return [self]
# File lib/mediawiktory/wikipedia/modules/featureusage.rb, line 49 def features(*values) values.inject(self) { |res, val| res._features(val) } end
start(value)
click to toggle source
Start of date range to query.
@param value [Time] @return [self]
# File lib/mediawiktory/wikipedia/modules/featureusage.rb, line 25 def start(value) merge(afustart: value.iso8601) end