I am attempting to use the watson api client from https://github.com/suchowan/watson-api-client
.
I have this written so far based on documentation from https://watson-api-explorer.ng.bluemix.net/listings/natural-language-understanding-v1.json
:
require 'watson-api-client'
service = WatsonAPIClient::NaturalLanguageUnderstanding.new(
:user=>"xxxxxxxxxxxx",
:password=>"yyyyyyyyy",
:verify_ssl=>OpenSSL::SSL::VERIFY_NONE
)
result = service.analyze(
'version' => "2018-03-16",
'parameters' => "keywords.sentiment",
'source' => "The quick brown fox jumps over the lazy cat"
)
p JSON.parse(result.body)
The issue is since there isn't anything I can find for sending the request through ruby I may be using the wrong parameters. For instance I get ArgumentError (Extra parameter(s) : 'source'
with this current code. I've tried replacing source with text to no avail. Has anyone successfully made a request like this in Ruby or knows what the proper parameters needed are?
Thanks.