提交 URI

使用集合让一切井井有条 根据您的偏好保存内容并对其进行分类。

创建 Webrisk 客户端并提交 URI。

代码示例

Java

public static Submission submitUriExample(String uri) throws IOException {
  // create-webrisk-client
  try (WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.create()) {
    Submission submission = Submission.newBuilder().setUri(uri).build();
    CreateSubmissionRequest submissionRequest =
        CreateSubmissionRequest.newBuilder()
            .setParent("projects/your-project-id")
            .setSubmission(submission)
            .build();
    Submission submissionResponse = webRiskServiceClient.createSubmission(submissionRequest);
    webRiskServiceClient.shutdownNow();
    System.out.println("The submitted " + submissionResponse);
    return submissionResponse;
  }
}

后续步骤

如需搜索并过滤其他 Google Cloud 产品的代码示例,请参阅 Google Cloud 示例浏览器