Skip to content

Commit 51db424

Browse files
authored
Merge pull request #79 from rosette-api/WS-2589-remove-genre-from-entities-example
WS-2589: remove genre from entities example
2 parents 0781aa1 + d794dfc commit 51db424

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

examples/entities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var endpoint = "entities";
1616
var entities_text_data = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit. Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel. In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters as well as coordinating with litigators in the SEC’s 11 regional offices around the country.";
1717

1818
api.parameters.content = entities_text_data;
19-
api.parameters.genre = "social-media";
19+
2020
api.rosette(endpoint, function(err, res){
2121
if(err){
2222
console.log(err);

lib/Api.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ function Api(userKey, serviceURL) {
102102
Api.prototype.rosette = function(endpoint, callback) {
103103

104104
var api = this;
105+
if (typeof(api.parameters.genre) !== 'undefined' && api.parameters.genre != null) {
106+
console.warn("The genre parameter is deprecated and will be removed in a future release.");
107+
}
105108
endpoint = require("./" + endpoint);
106109
var e = new endpoint();
107110

lib/parameters.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ function parameters() {
4545
this.contentUri = null;
4646
this.language = null;
4747
this.documentFile = null;
48-
this.genre = null;
4948
this.options = null;
5049

5150
// address similarity parameters
@@ -101,7 +100,6 @@ parameters.prototype.loadParams = function() {
101100
"content": this.content,
102101
"contentUri": this.contentUri,
103102
"language": this.language,
104-
"genre": this.genre,
105103
"address1": this.address1,
106104
"address2": this.address2,
107105
"name1": this.name1,

0 commit comments

Comments
 (0)