Module: MediaWiktory::Wikipedia::Modules::Contenttranslationlangtrend
- Defined in:
- lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb
Overview
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 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
-
#interval(value) ⇒ self
The interval for calculating the trend.
-
#source(value) ⇒ self
The source language code.
-
#target(value) ⇒ self
The target language code.
Instance Method Details
#interval(value) ⇒ self
The interval for calculating the trend. Can be week or month.
41 42 43 |
# 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) ⇒ self
The source language code.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb', line 25 def source(value) merge(source: value.to_s) end |
#target(value) ⇒ self
The target language code.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/contenttranslationlangtrend.rb', line 33 def target(value) merge(target: value.to_s) end |