Class: LanguageTools::AlchemyLanguage
- Inherits:
-
Object
- Object
- LanguageTools::AlchemyLanguage
- Includes:
- APISmith::Client
- Defined in:
- lib/esendex4soap.rb
Instance Method Summary collapse
- #detect(text) ⇒ Object
-
#initialize(api_key) ⇒ AlchemyLanguage
constructor
A new instance of AlchemyLanguage.
Constructor Details
#initialize(api_key) ⇒ AlchemyLanguage
Returns a new instance of AlchemyLanguage.
29 30 31 32 |
# File 'lib/esendex4soap.rb', line 29 def initialize(api_key) @api_key = api_key :outputMode => 'json', :apikey => @api_key end |
Instance Method Details
#detect(text) ⇒ Object
34 35 36 |
# File 'lib/esendex4soap.rb', line 34 def detect(text) (post "TextGetLanguage", :extra_query => {:text => text})["language"] end |