class Ktistec::Translator::DeepLTranslator

Overview

Client for DeepL translation.

Defined in:

utils/translator.cr

Constant Summary

DEEPL_API = "https://api.deepl.com/v2/translate"
DEEPL_FREE_API = "https://api-free.deepl.com/v2/translate"
Log = ::Log.for("translator.deep_l")

Constructors

Instance Method Summary

Instance methods inherited from class Ktistec::Translator

translate(name : String | Nil, summary : String | Nil, content : String | Nil, source : String, target : String) : NamedTuple(name: String | Nil, summary: String | Nil, content: String | Nil) translate

Constructor Detail

def self.new(api_uri : URI, api_key : String) #

[View source]

Instance Method Detail

def api_uri : URI #

[View source]
def translate(name : String | Nil, summary : String | Nil, content : String | Nil, source : String, target : String) : NamedTuple(name: String | Nil, summary: String | Nil, content: String | Nil) #

[View source]