module MediaWiktory::Wikipedia::Modules::Contenttranslationlangtrend
Query Content Translation database for numbers of translations by period of time.
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
_interval(value)
click to toggle source
@private
Calls superclass method
# File lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb, line 46 def _interval(value) defined?(super) && super || ["week", "month"].include?(value.to_s) && merge(interval: value.to_s) end
interval(value)
click to toggle source
The interval for calculating the trend. Can be week or month.
@param value [String] One of “week”, “month”. @return [self]
# File lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb, line 41 def interval(value) _interval(value) or fail ArgumentError, "Unknown value for interval: #{value}" end
source(value)
click to toggle source
The source language code.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb, line 25 def source(value) merge(source: value.to_s) end
target(value)
click to toggle source
The target language code.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb, line 33 def target(value) merge(target: value.to_s) end