@threekit/node-sdk
TypeScript icon, indicating that this package has built-in type declarations

3.0.5 • Public • Published

@threekit/node-sdk

This is a helper package for the Threekit REST API. It allows you to use our REST API directly from Node.JS with a high level of abstraction.

Supported APIs

This version of the API supports these main APIs:

  • Access Tokens
  • Asset Jobs
  • Assets
  • Configurations
  • Customers
  • Data Tables
  • Fast Compositor
  • Files
  • Images
  • Orders
  • Webhooks

Example Usage

import { threekitNodeClient } from '@threekit/node-sdk';

const tk = threekitNodeClient({
  authType: 'private',
  privateToken: '29443f10-c3a5-4a91-b33e-d1bdfcd8f2ec',
  apiHost: 'https://preview.threekit.com'
});

const fileStream = fs.createReadStream(fileName);
const uploadedFile = await tk.files.upload(
  fileStream,
  'myImage.png',
  'image/png'
);

const download = await tk.files.download(uploadedFile.id);

const contentFileName = path.join(tempDirectory, uploadedFile.filename);
const writeStream = fs.createWriteStream(contentFileName);
readableStream.pipe(download.data as NodeJS.ReadableStream);

Readme

Keywords

none

Package Sidebar

Install

npm i @threekit/node-sdk

Weekly Downloads

8

Version

3.0.5

License

ISC

Unpacked Size

111 kB

Total Files

73

Last publish

Collaborators

  • tshahab
  • nathanrobertbaldwin
  • rduboistk
  • pkumar54
  • afay1
  • lilyliu
  • threekitserviceaccount
  • will-threekit
  • kyleatthreekit
  • bhouston
  • fgrimshaw
  • ziyang2go
  • dphil
  • threekit_robot
  • asaeed3k
  • arobertson1
  • cdeng3k
  • zli109
  • kleethreekit
  • dsturk
  • bgassler