0.0.8 • Published 4 years ago

@therockstorm/sdk-ts v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@therockstorm/sdk-ts

The Vertex platform API SDK for TypeScript/JavaScript. The generated module can be used in Node.js, Webpack, and Browserify environments. To use with ES5, you must have a Promises/A+ library installed. It supports CommonJS and ES6 module systems.

It can be used in both TypeScript and JavaScript. In TypeScript, type definitions are automatically resolved.

Usage

Install the SDK and export your credentials,

# Install SDK
npm install --save @therockstorm/sdk-ts

# Export your Vertex Platform API client ID and secret
export VERTEX_CLIENT_ID={CLIENT_ID}
export VERTEX_CLIENT_SECRET={CLIENT_SECRET}

Then, create a client and start using the Vertex API,

import { prettyJson, VertexClient } from '.';

const main = async () => {
  // Shown with default values
  const client = await VertexClient.build({
    clientId: process.env.VERTEX_CLIENT_ID,
    clientSecret: process.env.VERTEX_CLIENT_SECRET,
    environment: 'platprod',
  });

  const getFilesRes = await client.files.getFiles(undefined, 1);

  console.log(prettyJson(getFilesRes.data));
};

main();

Local Development

# Install dependencies
npm install

# Transpile TypeScript to JavaScript
npm run build

# Format code
npm run format

# Publish to NPM
npm publish
0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago