Class: AlchemyLanguage::SentimentAnalysis

Inherits:
ActiveModel::Base show all
Defined in:
lib/alchemy_language/model/sentiment_analysis.rb

Instance Attribute Summary

Attributes inherited from ActiveModel::Base

#auth_token, #json_result, #options, #path, #prefix, #type

Instance Method Summary collapse

Methods inherited from ActiveModel::Base

#check_prefix, #initialize, #params_addressable, #request

Methods included from Generators::AlchemyRequest

#base_url, #json_parser, #rest_client_api

Methods inherited from ActiveMethod::Extra

add_response_field, #result

Constructor Details

This class inherits a constructor from AlchemyLanguage::ActiveModel::Base

Instance Method Details

#endpointObject



7
8
9
10
11
12
13
# File 'lib/alchemy_language/model/sentiment_analysis.rb', line 7

def endpoint
  url = "#{@type}/#{@prefix}GetTextSentiment"
  url << "?apikey=#{@auth_token}"
  url << "&#{@type}=#{@path}&outputMode=json"
  url << "&#{params_addressable}" unless params_addressable.empty?
  url
end