Sha256: e36a96b0e9b18d9bd397ee874dcd5d2015a189b22cf92454b295b7ab3710d0f6
Contents?: true
Size: 513 Bytes
Versions: 1
Compression:
Stored size: 513 Bytes
Contents
# encoding: UTF-8 require "faraday" require "faraday_middleware" require "json" module Dandelionapi class SentimentAnalysis < Base ENDPOINT = "/datatxt/sent/v1" attr_accessor :text, :url, :html, :html_fragment, :lang def analyze(options) raise MissingParameters.new("Please provide one of the following parameters: text, url, html or html_fragment") if ([:text, :url, :html, :html_fragment] & options.keys).empty? params = options call(ENDPOINT, params) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dandelionapi-0.0.3 | lib/dandelionapi/sentiment_analysis.rb |