GithubHelp home page GithubHelp logo

isabella232 / vertex-api-client-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vertexvis/vertex-api-client-node

0.0 0.0 0.0 1.48 MB

The Vertex REST API client for Node.js.

License: MIT License

Shell 0.45% JavaScript 0.09% TypeScript 99.46%

vertex-api-client-node's Introduction

Vertex API Client for Node.js

Version MIT License

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.

# Install client
npm install --save @vertexvis/api-client-node

# Export your Vertex REST API client ID and secret
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 {
    // Shown with default values
    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

# Install dependencies
yarn

# Transpile TypeScript to JavaScript
yarn build

# Format code
yarn format

Publishing

# Generate latest
yarn generate

# Generate using latest OpenAPI spec, version, and open GitHub PR
yarn push:version [patch|minor|major (default: patch)]

vertex-api-client-node's People

Contributors

amvertex avatar anderssjoblom-vertex avatar brentav avatar chrisgray-vertex avatar danschultz avatar dependabot[bot] avatar echo5-ci avatar gbiv avatar jareddellitt avatar madisonehlers-vertex avatar sourada-e5 avatar therockstorm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.