module Feels
Constants
- VERSION
Public Class Methods
credentials(api_key)
click to toggle source
# File lib/feels.rb, line 19 def self.credentials api_key @headers = { "X-Mashape-Key" => api_key, "Content-Type" => "application/x-www-form-urlencoded", "Accept" => "application/json" } end
tone(words)
click to toggle source
# File lib/feels.rb, line 10 def self.tone words include Default parameters = { "text" => words } response = Unirest.post(@@api_endpoint, headers: @headers, parameters: parameters) response.body['score'] end