class Dilki::Client

Attributes

api_key[R]

Public Instance Methods

detect(text) click to toggle source
# File lib/dilki.rb, line 16
def detect(text)
 data = ::Methods::DetectLangs.run(api_key, text)
 data['lang']
end
get_langs() click to toggle source
# File lib/dilki.rb, line 11
def get_langs
 data = ::Methods::GetLangs.run(api_key)
 data['dirs']
end
translate(text, from="en", to = "ru") click to toggle source
# File lib/dilki.rb, line 21
def translate(text, from="en", to = "ru")
 data = ::Methods::Translate.run(api_key, text, from, to)
 data['text'].first
end