@@ -33,14 +33,8 @@ const METHOD_POST = 'POST';
3333const PATH_USER_DEFINED_IMAGE = '/rest/2.0/solution/v1/img_censor/v2/user_defined' ;
3434const 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' ;
3936const 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
4539const 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 ;
0 commit comments