Skip to content

Instantly share code, notes, and snippets.

@vpekar vpekar/get-sentiment-client.rb Secret
Last active Feb 3, 2016

Embed
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",
"<ACCESS-KEY-HEADER>" => "<ACCESS-KEY>"
}
url = "<ACCESS-URL>"
response = RestClient.post url, values, headers
puts response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.