Vertex API Client for Node.js
TypeDoc Documentation
If you're ready to integrate Vertex into your application, this is the place! For more background on the Vertex platform, start with our Developer Portal.
The Vertex REST API client for Node.js is generated using openapi-generator
, so it's always up-to-date. On top of the generated code, we've added a higher-level client and helpers in the ./client
directory.
Usage
If you're not an existing Vertex customer, sign up for a free account.
Install the client and export your credentials.
npm install --save @vertexvis/api-client-node
export VERTEX_CLIENT_ID=[YOUR_CLIENT_ID]
export VERTEX_CLIENT_SECRET=[YOUR_CLIENT_SECRET]
Then, create a client and start using the Vertex API.
import { logError, prettyJson, VertexClient } from '@vertexvis/api-client-node';
const main = async () => {
try {
const client = await VertexClient.build({
basePath: 'https://platform.vertexvis.com',
client: {
id: process.env.VERTEX_CLIENT_ID,
secret: process.env.VERTEX_CLIENT_SECRET,
},
});
const getFilesRes = await client.files.getFiles({ pageSize: 1 });
console.log(prettyJson(getFilesRes.data));
} catch (error) {
logError(error, console.error);
}
};
main();
Local Development
yarn
yarn build
yarn format
Publishing
yarn generate
yarn push:version [patch|minor|major (default: patch)]