Package Exports
- butler-sdk
- butler-sdk/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (butler-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 easierInstallation & Usage
npm install
npm install butler-sdkGetting 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 butlerTest
API_KEY="api-key" QUEUE_ID="queue-id" yarn run ts-node test.ts