Module: DeeplAPI
- Defined in:
- lib/deepl_api.rb,
lib/deepl_api/cli.rb,
lib/deepl_api/errors.rb,
lib/deepl_api/version.rb
Overview
Requirements
You need to have a valid [DeepL Pro Developer](www.deepl.com/pro#developer) account with an associated API key. This key must be made available to the application, e. g. via environment variable:
“‘bash export DEEPL_API_KEY=YOUR_KEY “`
## Example
“‘text require “deepl_api”
deepl = DeeplAPI::DeepL.new( api_key: ENV ) 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”] )
> [“text”=>“yes”]
“‘
## See Also
The main API functions are documented in the DeepL class.
Defined Under Namespace
Modules: Errors Classes: CLI, DeepL, Formality, SplitSentences, UsageInformation
Constant Summary collapse
- VERSION =
"0.2.1"