# butler-sdk

> Butler javascript sdk

Latest version **0.0.2** (published 2022-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install butler-sdk
pnpm add butler-sdk
yarn add butler-sdk
bun add butler-sdk
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-06-30 |
| First published | 2022-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 183.3 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Butler Labs |
| Maintainers | abijayanth |
| Keywords | fetch, typescript, openapi-client, openapi-generator |

## Links

- npm: https://www.npmjs.com/package/butler-sdk
- npm.io page: https://npm.io/package/butler-sdk

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [form-data](https://npm.io/package/form-data.md) ^4.0.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2022-06-30
- 0.0.1 — 2022-06-25

## README

# Butler
Welcome to [Butler's Javascript and Typescript SDK](https://butlerlabs.ai)

      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

```sh
npm install butler-sdk
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```typescript

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
```sh
openapi-generator generate -i https://app.butlerlabs.ai/api/docs-json -g typescript-axios --package-name butler
```

### Test
```sh
API_KEY="api-key" QUEUE_ID="queue-id" yarn run ts-node test.ts
```

---
_Source: https://npm.io/package/butler-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
