客户端库

尽管您可以通过发出直接请求来使用 Video Intelligence,不过我们提供了几种常用语言的客户端库。Video Intelligence 客户端库基于 Google Cloud 客户端库构建。这种通用基础架构提供了可实现 API 专属库的功能,另外还提供了在使用任何 Cloud API 时可以直接使用的类型和方法。

可用的客户端库

Video Intelligence 提供以下语言的客户端库和指南:

Python

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

本页面提供了 Video Intelligence Python 客户端库的参考文档和相关资源。

资源 说明
库参考文档 Video Intelligence Python 库参考文档
语言指南 将 Python 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 Python 标记的问题

安装

要安装客户端库,请运行以下命令:

pip install --upgrade google-cloud-videointelligence

Java

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

本页面提供了 Video Intelligence Java 客户端库的参考文档和相关资源。

资源 说明
库参考文档 Video Intelligence Java 库参考文档
语言指南 将 Java 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 Java 标记的问题

安装

要安装客户端库,请运行以下命令:

If you are using Maven, add the following to your pom.xml file. For more information about BOMs, see The Google Cloud Platform Libraries BOM.

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>libraries-bom</artifactId>
      <version>26.37.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-video-intelligence</artifactId>
  </dependency>

If you are using Gradle, add the following to your dependencies:

implementation 'com.google.cloud:google-cloud-video-intelligence:2.40.0'

If you are using sbt, add the following to your dependencies:

libraryDependencies += "com.google.cloud" % "google-cloud-video-intelligence" % "2.40.0"

If you're using Visual Studio Code, IntelliJ, or Eclipse, you can add client libraries to your project using the following IDE plugins:

The plugins provide additional functionality, such as key management for service accounts. Refer to each plugin's documentation for details.

Node.js

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

本页面提供了 Video Intelligence Node.js 客户端库的参考文档和相关资源。

资源 说明
库参考文档 Video Intelligence Node.js 库参考文档
语言指南 将 Node.js 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 Node.js 标记的问题

安装

要安装客户端库,请运行以下命令:

如需了解详情,请参阅设置 Node.js 开发环境

npm install --save @google-cloud/video-intelligence

C++

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

本页面提供了 Video Intelligence C++ 客户端库的参考文档和相关资源。

资源 说明
库引用路径 Video Intelligence C++ 库参考文档
语言指南 将 C++ 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 C++ 标记的问题

安装

要安装客户端库,请运行以下命令:

如需了解详情,请参阅设置 C++ 开发环境

Go

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

本页面提供了 Video Intelligence Go 客户端库的参考文档和相关资源。

资源 说明
库参考文档 Video Intelligence Go 库参考文档
语言指南 将 Go 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 Go 标记的问题

安装

要安装客户端库,请运行以下命令:

如需了解详情,请参阅设置 Go 开发环境

go get cloud.google.com/go/videointelligence/apiv1

PHP

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

本页面提供了 Video Intelligence PHP 客户端库的参考文档和相关资源。

资源 说明
库参考文档 Video Intelligence PHP 库参考文档
语言指南 将 PHP 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 PHP 标记的问题

安装

要安装客户端库,请运行以下命令:

composer require google/cloud-videointelligence

Ruby

如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。如需了解详情,请参阅为本地开发环境设置身份验证

用于 Video Intelligence 的 Ruby 客户端库目前作为测试版发布。

本页面提供了 Video Intelligence Ruby 客户端库的参考文档和相关资源。

资源 说明
库参考文档 Video Intelligence Ruby 库参考文档
语言指南 将 Ruby 与 GCP 搭配使用的一般指南
GitHub 代码库 此库的源代码和其他文档
快速入门 关于使用此库的简介
Stack Overflow 带有 Video Intelligence 和 Ruby 标记的问题

安装

要安装客户端库,请运行以下命令:

如需了解详情,请参阅设置 Ruby 开发环境

gem install google-cloud-video_intelligence

身份验证和访问控制

Video Intelligence 快速入门指南提供了有关身份验证和访问控制的基本信息。如需了解详情,请参阅以下内容: