module MediaWiktory::Wikipedia::Modules::GContenttranslation

Query Content Translation database for translations. _Generator module: for fetching pages corresponding to request._

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

_type(value) click to toggle source

@private

Calls superclass method
# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 78
def _type(value)
  defined?(super) && super || ["draft", "published"].include?(value.to_s) && merge(gtype: value.to_s)
end
from(value) click to toggle source

The source language code.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 33
def from(value)
  merge(gfrom: value.to_s)
end
limit(value) click to toggle source

The maximum number of translations to fetch.

@param value [Integer, “max”] @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 57
def limit(value)
  merge(glimit: value.to_s)
end
offset(value) click to toggle source

Offset into result set (optional).

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 65
def offset(value)
  merge(goffset: value.to_s)
end
sourcetitle(value) click to toggle source

The title of the source page.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 49
def sourcetitle(value)
  merge(gsourcetitle: value.to_s)
end
to(value) click to toggle source

The target language code.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 41
def to(value)
  merge(gto: value.to_s)
end
translationid(value) click to toggle source

Translation ID.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 25
def translationid(value)
  merge(gtranslationid: value.to_s)
end
type(value) click to toggle source

State of the translation.

@param value [String] One of “draft”, “published”. @return [self]

# File lib/mediawiktory/wikipedia/modules/g-contenttranslation.rb, line 73
def type(value)
  _type(value) or fail ArgumentError, "Unknown value for type: #{value}"
end