npm.io
0.0.2 • Published 4 years ago

butler-sdk

Licence
MIT
Version
0.0.2
Deps
2
Size
183 kB
Vulns
23
Weekly
0

Butler

Welcome to Butler's Javascript and Typescript SDK

  Butler APIs are built on top of the OpenAPI 3.0 standard, and the SDK provides convenience
  functions to make programming easier

Installation & Usage

npm install

npm install butler-sdk

Getting Started

Please follow the installation procedure and then run the following:


import { Butler } from 'butler-sdk';
// Get API Key from https://docs.butlerlabs.ai/reference/uploading-documents-to-the-rest-api#get-your-api-key
const apiKey = '<api-key>'
// Get Queue ID from https://docs.butlerlabs.ai/reference/uploading-documents-to-the-rest-api#go-to-the-model-details-page
const queueId = '<queue_id>'
const file = fs.createReadStream('test.pdf');

// Create client
const client = new Butler(apiKey)

client.extractFile(queueId, file).then((x) => {
  console.log(x);
});

Maintain

Regenerate code to reflect latest API Spec
openapi-generator generate -i https://app.butlerlabs.ai/api/docs-json -g typescript-axios --package-name butler
Test
API_KEY="api-key" QUEUE_ID="queue-id" yarn run ts-node test.ts

Keywords