module Sogou::Translate
Constants
- VERSION
Public Class Methods
translate(text)
click to toggle source
# File lib/sogou/translate/get.rb, line 8 def self.translate(text) res = HTTP.post(@API_BASE, :form => { :from => "auto", :text => text, }).body.to_s rv = JSON.parse(res) return rv end