This page shows how to get started with the Cloud Client Libraries for the Document AI Warehouse API. Read more about the client libraries for Cloud APIs, including the older Google API Client Libraries, in Client Libraries Explained.
Install the client library
Java
For more information, see Setting Up a Java Development Environment.
If you are using Maven, add this to your pom.xml file:<dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud</artifactId> <version>0.3.0</version> </dependency>
If you are using Gradle, add this to your dependencies:
compile 'com.google.cloud:google-cloud:0.3.0'
If you are using SBT, add this to your dependencies:
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.3.0"
Node.js
For more information, see Setting Up a Node.js Development Environment.
npm install @google-cloud/contentwarehouse
Python
For more information, see Setting Up a Python Development Environment.
pip install --upgrade google-cloud-contentwarehouse
Set up authentication
When you use client libraries, you use Application Default Credentials (ADC) to authenticate. For information about setting up ADC, see Provide credentials for Application Default Credentials. For information about using ADC with client libraries, see Authenticate using client libraries.
Use the client library
The following example shows how to use the client library.
Python
For more information, see the Document AI Warehouse Python API reference documentation.
To authenticate to Document AI Warehouse, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.