Skip to content

Commit 1b27685

Browse files
committed
refactor(personality-insights-v3): remove compatibility layer for personality insights v3
BREAKING CHANGE: Deprecated methods in Personality Insights v3 are no longer available. Changed parameter names are no longer interally corrected. To migrate your code, use the methods and parameters currently available with the service as documented here: https://www.ibm.com/watson/developercloud/personality-insights/api/v3/node.html?node
1 parent 359cc79 commit 1b27685

7 files changed

Lines changed: 439 additions & 792 deletions

File tree

examples/personality_insights.v3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ personalityInsights.profile(
7878
* https://console.bluemix.net/docs/services/personality-insights/output-csv.html#outputCSV
7979
*/
8080
personalityInsights
81-
.profile_csv({
81+
.profileAsCsv({
8282
content: 'Enter more than 100 unique words here...',
8383
content_type: 'text/plain',
8484
csv_headers: true

personality-insights/v3-generated.ts

Lines changed: 0 additions & 486 deletions
This file was deleted.

personality-insights/v3.ts

Lines changed: 435 additions & 84 deletions
Large diffs are not rendered by default.

test/integration/test.adapter.personality_insights.v3.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

test/integration/test.personality_insights.v3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ describe('personality_insights_v3_integration', function() {
6868
accept: 'text/csv',
6969
},
7070
};
71-
personality_insights.profile_csv(params, done);
71+
personality_insights.profileAsCsv(params, done);
7272
});
7373
});

test/unit/test.adapter.personality_insights.v3.js

Lines changed: 0 additions & 159 deletions
This file was deleted.

test/unit/test.personality_insights.v3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('personality_insights_v3', function() {
119119

120120
it('should generate a valid csv request', function() {
121121
const params = { content: content_items, content_type: 'application/json' };
122-
const req = personality_insights.profile_csv(params, noop);
122+
const req = personality_insights.profileAsCsv(params, noop);
123123
const body = Buffer.from(req.body).toString('ascii');
124124
assert.equal(req.uri.href, service.url + service_path + '?version=2016-10-19');
125125
assert.equal(body, JSON.stringify(params.content));
@@ -132,7 +132,7 @@ describe('personality_insights_v3', function() {
132132
content_type: 'application/json',
133133
csv_headers: true,
134134
};
135-
const req = personality_insights.profile_csv(params, noop);
135+
const req = personality_insights.profileAsCsv(params, noop);
136136
const body = Buffer.from(req.body).toString('ascii');
137137
assert.equal(req.uri.href, service.url + service_path + '?version=2016-10-19&csv_headers=true');
138138
assert.equal(body, JSON.stringify(params.content));

0 commit comments

Comments
 (0)