JSPM

  • Created
  • Published
  • Downloads 13563
  • Score
    100M100P100Q165548F
  • License MIT

Mindee Client Library for Node.js

Package Exports

  • mindee
  • mindee/src/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 (mindee) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Mindee API Helper Library for Node.js

Quickly and easily connect to Mindee's API services using Node.js.

Quick Start

Here's the TL;DR of getting started.

First, get an API Key

Then, install this library:

npm install mindee

Finally, Node.js away!

Off-the-Shelf Documents

const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";

// Init a new client
const mindeeClient = new mindee.Client({apiKey: "my-api-key"});

// Load a file from disk and parse it
const invoiceResponse = mindeeClient
    .docFromPath("/path/to/the/invoice.pdf")
    .parse(mindee.InvoiceV3);

// Print a brief summary of the parsed data
invoiceResponse.then((resp) => {
    console.log(resp.document);
});

Custom Documents (API Builder)

const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";

// Init a new client and add your document endpoint
const mindeeClient = new mindee.Client({apiKey: "my-api-key"})
    .addEndpoint({
        accountName: "john",
        endpointName: "wsnine",
    });

// Load a file from disk and parse it
const customResponse = mindeeClient
    .docFromPath("/path/to/the/wsnine.jpg")
    .parse(mindee.CustomV1, { endpointName: "wsnine" });

// Print a brief summary of the parsed data
customResponse.then((resp) => {
    console.log(resp.document);
});

Further Reading

There's more to it than that for those that need more features, or want to customize the experience.

All the juicy details are described in the Official Documentation.

License

Copyright © Mindee

Available as open source under the terms of the MIT License.