() \ .with_credentials(credentials) \ .with_region(ModerationRegion.value_of("xxx"))\ .build() # 把xxx替换成服务所在的区域
projectId = process.env.HUAWEICLOUD_SDK_PROJECT_ID; const endpoint = "https://moderation.ap-southeast-3.myhuaweicloud.com"; //把ap-southeast-3替换成服务所在的区域
ModerationClient.new_builder() \ .with_credentials(credentials) \ .with_region(ModerationRegion.value_of("xxx")) \ .build() # 把xxx替换成服务所在的区域
//把xxx替换成服务所在的区域,例如新加坡:ap-southeast-3。 WithCredential(auth).
获取步骤如下: 登录内容审核服务管理控制台。 鼠标移动至用户名,在下拉列表中单击“我的凭证”。 在“API凭证”页面的查看“账号名”和“账号ID”。 图1 获取账号名和ID 父主题: 附录
ModerationClient.newBuilder() .withCredential(auth) .withRegion(ModerationRegion.valueOf("xxx")) //把xxx替换成服务所在的区域
$projectId = getenv('HUAWEICLOUD_SDK_PROJECT_ID'); $endpoint = "https://moderation.ap-southeast-3.myhuaweicloud.com";//把ap-southeast-3替换成服务所在的区域
projectId = process.env.HUAWEICLOUD_SDK_PROJECT_ID; const endpoint = "https://moderation.ap-southeast-3.myhuaweicloud.com"; //把ap-southeast-3替换成服务所在的区域
client = ModerationClient.NewBuilder() .WithCredential(auth) .WithRegion(ModerationRegion.ValueOf("xxx")) //把xxx替换成服务所在的区域
//把xxx替换成服务所在的区域,例如新加坡:ap-southeast-3。 WithCredential(auth).
ModerationClient.new_builder() \ .with_credentials(credentials) \ .with_region(ModerationRegion.value_of("xxx")) \ .build() # 把xxx替换成服务所在的区域
$projectId = getenv('HUAWEICLOUD_SDK_PROJECT_ID'); $endpoint = "https://moderation.ap-southeast-3.myhuaweicloud.com";//把ap-southeast-3替换成服务所在的区域
//把xxx替换成服务所在的区域,例如新加坡:ap-southeast-3。 WithCredential(auth).
projectId = process.env.HUAWEICLOUD_SDK_PROJECT_ID; const endpoint = "https://moderation.ap-southeast-3.myhuaweicloud.com"; //把ap-southeast-3替换成服务所在的区域
默认API调用最大并发为10(表示1秒内最多请求10次),如需调整更高并发限制请通过工单联系专业工程师为您服务。
cURL充当的是HTTP客户端,可以发送HTTP请求给服务端,并接收响应消息。cURL适用于接口调试。关于cURL详细信息请参见https://curl.haxx.se/。 编码 通过编码调用接口,组装请求消息,并发送处理请求消息。
有如下两种获取方式: 从控制台获取项目ID和名称 调用API获取项目ID 从控制台获取项目ID和名称 从控制台获取项目ID(project_id)和名称(project name)的步骤如下: 登录内容审核服务管理控制台。
ModerationClient.NewBuilder() .WithCredential(auth) .WithRegion(ModerationRegion.ValueOf("xxx")) //把xxx替换成服务所在的区域
$projectId = getenv('HUAWEICLOUD_SDK_PROJECT_ID'); $endpoint = "https://moderation.ap-southeast-3.myhuaweicloud.com";//把ap-southeast-3替换成服务所在的区域
//把xxx替换成服务所在的区域,例如新加坡:ap-southeast-3。 WithCredential(auth).