@@ -48,7 +48,7 @@ describe('alchemy_language', function() {
4848
4949 it ( 'should generate a valid payload' , function ( ) {
5050 var req = alchemy . entities ( payload , noop ) ;
51- assert . equal ( req . uri . href , service . url + apiPath + '?apikey =' + service . api_key ) ;
51+ assert . equal ( req . uri . href , service . url + apiPath + '?api_key =' + service . api_key ) ;
5252 assert . equal ( req . method , 'POST' ) ;
5353 assert ( req . form ) ;
5454 var body = new Buffer ( req . body ) . toString ( 'ascii' ) ;
@@ -57,7 +57,7 @@ describe('alchemy_language', function() {
5757
5858 it ( 'should use sentiment_target if target is specified' , function ( ) {
5959 var req = alchemy . sentiment ( { text : payload . text , target :'bat' } , noop ) ;
60- var sentimenTargetPath = service . url + '/text/TextGetTargetedSentiment?apikey =' + service . api_key ;
60+ var sentimenTargetPath = service . url + '/text/TextGetTargetedSentiment?api_key =' + service . api_key ;
6161 assert . equal ( req . uri . href , sentimenTargetPath ) ;
6262 assert . equal ( req . method , 'POST' ) ;
6363 assert ( req . form ) ;
@@ -68,7 +68,7 @@ describe('alchemy_language', function() {
6868
6969 it ( 'should use sentiment if target is not specified' , function ( ) {
7070 var req = alchemy . sentiment ( payload , noop ) ;
71- var sentimenPath = service . url + '/text/TextGetTextSentiment?apikey =' + service . api_key ;
71+ var sentimenPath = service . url + '/text/TextGetTextSentiment?api_key =' + service . api_key ;
7272 assert . equal ( req . uri . href , sentimenPath ) ;
7373 assert . equal ( req . method , 'POST' ) ;
7474 assert ( req . form ) ;
@@ -79,7 +79,7 @@ describe('alchemy_language', function() {
7979
8080 it ( 'should use /text/ endpoint if the text parameter is passed' , function ( ) {
8181 var req = alchemy . sentiment ( { text : payload . text , url :'www.ibm.com' } , noop ) ;
82- var sentimenPath = service . url + '/text/TextGetTextSentiment?apikey =' + service . api_key ;
82+ var sentimenPath = service . url + '/text/TextGetTextSentiment?api_key =' + service . api_key ;
8383 assert . equal ( req . uri . href , sentimenPath ) ;
8484 assert . equal ( req . method , 'POST' ) ;
8585 assert ( req . form ) ;
@@ -90,7 +90,7 @@ describe('alchemy_language', function() {
9090
9191 it ( 'should use /html/ endpoint if the html parameter is passed' , function ( ) {
9292 var req = alchemy . sentiment ( { html : '<html><body>test</body></html>' , url :'www.ibm.com' } , noop ) ;
93- var sentimenPath = service . url + '/html/HTMLGetTextSentiment?apikey =' + service . api_key ;
93+ var sentimenPath = service . url + '/html/HTMLGetTextSentiment?api_key =' + service . api_key ;
9494 assert . equal ( req . uri . href , sentimenPath ) ;
9595 assert . equal ( req . method , 'POST' ) ;
9696 assert ( req . form ) ;
@@ -119,7 +119,7 @@ describe('alchemy_language', function() {
119119
120120 it ( 'should generate a valid payload' , function ( ) {
121121 var req = alchemy . title ( payload , noop ) ;
122- assert . equal ( req . uri . href , service . url + apiPath + '?apikey =' + service . api_key ) ;
122+ assert . equal ( req . uri . href , service . url + apiPath + '?api_key =' + service . api_key ) ;
123123 assert . equal ( req . method , 'POST' ) ;
124124 assert ( req . form ) ;
125125 var body = new Buffer ( req . body ) . toString ( 'ascii' ) ;
@@ -136,7 +136,7 @@ describe('alchemy_language', function() {
136136
137137 it ( 'should generate a valid payload' , function ( ) {
138138 var req = alchemy . title ( payload , noop ) ;
139- assert . equal ( req . uri . href , service . url + apiPath + '?apikey =' + service . api_key ) ;
139+ assert . equal ( req . uri . href , service . url + apiPath + '?api_key =' + service . api_key ) ;
140140 assert . equal ( req . method , 'POST' ) ;
141141 assert ( req . form ) ;
142142 var body = new Buffer ( req . body ) . toString ( 'ascii' ) ;
@@ -155,7 +155,7 @@ describe('alchemy_language', function() {
155155
156156 it ( 'should generate a valid payload' , function ( ) {
157157 var req = alchemy . dates ( payload , noop ) ;
158- assert . equal ( req . uri . href , service . url + apiPath + '?apikey =' + service . api_key ) ;
158+ assert . equal ( req . uri . href , service . url + apiPath + '?api_key =' + service . api_key ) ;
159159 assert . equal ( req . method , 'POST' ) ;
160160 assert ( req . form ) ;
161161 var body = new Buffer ( req . body ) . toString ( 'ascii' ) ;
@@ -178,7 +178,7 @@ describe('alchemy_language', function() {
178178
179179 it ( 'should get document-level emotion if no target is passed' , function ( ) {
180180 var req = alchemy . emotion ( payload , noop ) ;
181- var emotionPath = service . url + '/text/TextGetEmotion?apikey =' + service . api_key ;
181+ var emotionPath = service . url + '/text/TextGetEmotion?api_key =' + service . api_key ;
182182 assert . equal ( req . uri . href , emotionPath ) ;
183183 assert . equal ( req . method , 'POST' ) ;
184184 assert ( req . form ) ;
@@ -190,7 +190,7 @@ describe('alchemy_language', function() {
190190
191191 it ( 'should get targeted emotion if targets are passed' , function ( ) {
192192 var req = alchemy . emotion ( target_payload , noop ) ;
193- var targetedEmotionPath = service . url + '/text/TextGetTargetedEmotion?apikey =' + service . api_key ;
193+ var targetedEmotionPath = service . url + '/text/TextGetTargetedEmotion?api_key =' + service . api_key ;
194194 assert . equal ( req . uri . href , targetedEmotionPath ) ;
195195 assert . equal ( req . method , 'POST' ) ;
196196 assert ( req . form ) ;
0 commit comments