butler-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i butler-sdk

Weekly Downloads

677

Version

0.0.2

License

MIT

Unpacked Size

188 kB

Total Files

37

Last publish

Collaborators

  • abijayanth
  • butler-davidzeng
  • mnoe1161