Skip to content

Commit b39c269

Browse files
author
ruanshimin
committed
去除一些废弃代码,更新图像搜索一些接口的参数 版本=》2.4.6
1 parent 659e1fa commit b39c269

File tree

4 files changed

+33
-247
lines changed

4 files changed

+33
-247
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "baidu-aip-sdk",
3-
"version": "2.4.5",
3+
"version": "2.4.6",
44
"description": "百度AI开放平台Nodejs SDK, 文档以及详情请访问官网: https://ai.baidu.com",
55
"main": "src/index.js",
66
"scripts": {

src/AipContentCensor.js

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,8 @@ const METHOD_POST = 'POST';
3333
const PATH_USER_DEFINED_IMAGE = '/rest/2.0/solution/v1/img_censor/v2/user_defined';
3434
const PATH_USER_DEFINED_TEXT = '/rest/2.0/solution/v1/text_censor/v2/user_defined';
3535

36-
const PATH_ANTIPORN_GIF = '/rest/2.0/antiporn/v1/detect_gif';
37-
const PATH_FACEAUDIT = '/rest/2.0/solution/v1/face_audit';
38-
const PATH_COMBOCENSOR = '/api/v1/solution/direct/img_censor';
3936
const PATH_REPORT = '/rpc/2.0/feedback/v1/report';
4037

41-
const PATH_ANTIPORN = '/rest/2.0/antiporn/v1/detect';
42-
const PATH_ANTITERROR = '/rest/2.0/antiterror/v1/detect';
43-
const PATH_ANTISPAM = '/rest/2.0/antispam/v2/spam';
4438

4539
const scope = require('./const/devScope').DEFAULT;
4640

@@ -80,53 +74,6 @@ class AipImageCensor extends BaseClient {
8074
return this.doRequest(requestInfo, httpClient);
8175
}
8276

83-
antiPornGif(image, options) {
84-
let param = {
85-
image: image,
86-
targetPath: PATH_ANTIPORN_GIF
87-
};
88-
return this.commonImpl(objectTools.merge(param, options));
89-
}
90-
91-
antiPorn(image, options) {
92-
let param = {
93-
image: image,
94-
targetPath: PATH_ANTIPORN
95-
};
96-
return this.commonImpl(objectTools.merge(param, options));
97-
}
98-
99-
antiTerror(image, options) {
100-
let param = {
101-
image: image,
102-
targetPath: PATH_ANTITERROR
103-
};
104-
return this.commonImpl(objectTools.merge(param, options));
105-
}
106-
107-
antiSpam(content, options) {
108-
let param = {
109-
content: content,
110-
targetPath: PATH_ANTISPAM
111-
};
112-
return this.commonImpl(objectTools.merge(param, options));
113-
}
114-
115-
faceAudit(images, type, configId) {
116-
let param = {configId: configId};
117-
if (type === 'url') {
118-
images = images.map(function (elm) {
119-
return encodeURIComponent(elm);
120-
});
121-
param.imgUrls = images.join(',');
122-
}
123-
if (type === 'base64') {
124-
param.images = images.join(',');
125-
}
126-
param.targetPath = PATH_FACEAUDIT;
127-
return this.commonImpl(param);
128-
}
129-
13077
imageCensorUserDefined(image, type) {
13178
let param = {};
13279
if (type === 'url') {
@@ -146,20 +93,6 @@ class AipImageCensor extends BaseClient {
14693
return this.commonImpl(param);
14794
}
14895

149-
imageCensorComb(image, type, scenes, scenesConf) {
150-
let param = {};
151-
if (type === 'url') {
152-
param.imgUrl = image;
153-
}
154-
if (type === 'base64') {
155-
param.image = image;
156-
}
157-
param.scenes = scenes;
158-
param.sceneConf = scenesConf;
159-
param.targetPath = PATH_COMBOCENSOR;
160-
return this.jsonRequestImpl(param);
161-
}
162-
16396
report(feedback) {
16497
let param = {};
16598
param.feedback = feedback;

src/AipImageCensor.js

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

0 commit comments

Comments
 (0)