JSPM

butler-sdk

0.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 5617
    • Score
      100M100P100Q124336F
    • License MIT

    Butler javascript sdk

    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 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