Skip to content

Instantly share code, notes, and snippets.


vpekar/get-sentiment-client.rb Secret

Last active Feb 3, 2016
What would you like to do?
require 'rubygems'
require 'rest_client'
values = {
"text" => 'The food was great, but the service was slow.',
"categories" => 1,
"sentiment" => 1,
"annotate"=> 0
headers = {
"content_type" => "application/json; charset=utf_8",
url = "<ACCESS-URL>"
response = url, values, headers
puts response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment