aliyun-cdi
v0.1.8
Published
阿里云内容检测API
Downloads
15
Readme
Aliyun-Cdi
阿里云绿网内容检测API 封装
安装
npm install aliyun-cdi
示例
var request = require('request');
var composeUrl = require('aliyun-cdi');
var url = composeUrl({
AccessKeyID: 'XXX', // 你申请的AccessKeyID
AccessKeySecret: 'XXX', // 你申请的AccessKeySecret
Action: 'ImageDetection', // Action
Scene: ['porn'], // 场景
ImageUrl: ['http://dun.163.com/res/sample/sex_2.jpg'] // 资源实例
});
request.post(url, function (err, res, body) {
if (res.statusCode === 200) {
console.log(body);
} else {
console.log(res.statusCode, err);
}
});