module DeeplAPI
Requirements
You need to have a valid DeepL Pro Developer account with an associated API key. This key must be made available to the application, e. g. via environment variable:
export DEEPL_API_KEY=YOUR_KEY
Example¶ ↑
require "deepl_api" deepl = DeeplAPI::DeepL.new( api_key: ENV["DEEPL_API_KEY"] ) usage = deepl.usage_information() => #<DeeplAPI::UsageInformation:0x00007fcbc588cc08 @character_limit=250000, @character_count=1450> translation = deepl.translate( source_language: "DE", target_language: "EN-US", texts: ["ja"] ) => [{"detected_source_language"=>"DE", "text"=>"yes"}]
See Also¶ ↑
The main API functions are documented in the DeepL
class.
Constants
- VERSION