Sha256: 8ca47a8fea801440e062a69fd1529466c3a07d44881ea2b1aefe7a4f40bdf53d

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module MediaWiktory::Wikipedia
  module Actions
    # Fetch the Content Translation configuration json for the given language pair.
    #
    # Usage:
    #
    # ```ruby
    # api.cxconfiguration.from(value).perform # returns string with raw output
    # # or
    # api.cxconfiguration.from(value).response # returns output parsed and wrapped into Response object
    # ```
    #
    # See {Base} for generic explanation of working with MediaWiki actions and
    # {MediaWiktory::Wikipedia::Response} for working with action responses.
    #
    # All action's parameters are documented as its public methods, see below.
    #
    class Cxconfiguration < MediaWiktory::Wikipedia::Actions::Get

      # The source language code.
      #
      # @param value [String]
      # @return [self]
      def from(value)
        merge(from: value.to_s)
      end

      # The target language code.
      #
      # @param value [String]
      # @return [self]
      def to(value)
        merge(to: value.to_s)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mediawiktory-0.1.3 lib/mediawiktory/wikipedia/actions/cxconfiguration.rb
mediawiktory-0.1.2 lib/mediawiktory/wikipedia/actions/cxconfiguration.rb
mediawiktory-0.1.1 lib/mediawiktory/wikipedia/actions/cxconfiguration.rb
mediawiktory-0.1.0 lib/mediawiktory/wikipedia/actions/cxconfiguration.rb