class Ehrmagerd::Translator
Public Class Methods
translate(string)
click to toggle source
# File lib/ehrmagerd/translator.rb, line 8 def self.translate(string) response = Unirest::post "https://jmillerdesign-ermahgerd-translator.p.mashape.com/api", headers: { "X-Mashape-Authorization" => Ehrmagerd.api_token }, parameters: { "input" => string } parsed_response = JSON.parse(response.raw_body) translated_string = parsed_response["data"]["output"] end