Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 949 Bytes

README.md

File metadata and controls

49 lines (38 loc) · 949 Bytes

JavaScript SDK for Lucidtech AI Services API

Installation

Browser version

$ yarn add @lucidtech/las-sdk-browser
$ npm install @lucidtech/las-sdk-browser

Node version

$ yarn add @lucidtech/las-sdk-node
$ npm install @lucidtech/las-sdk-node

Usage

import { Client } from '@lucidtech/las-sdk-core';
import { ClientCredentials } from '@lucidtech/las-sdk-node';

const credentials = new ClientCredentials('<apiEndpoint>', '<apiKey>', '<clientId>',  '<clientSecret>', '<authEndpoint>');
const client = new Client(credentials);

const content = '<read image content>'
client.postDocuments(content, 'image/jpeg', '<consentId>').then(documentResponse => {
    console.log(documentResponse);
}).catch(error => {
    console.log(error);
})

Contributing

Install dependencies

$ npm install && npm run upgrade-lucidtech

Build

$ npm run build

Run tests

$ npm run test test