JavaScript SDK

Installation

Browser version

1
$ yarn add @lucidtech/las-sdk-browser
2
$ npm install @lucidtech/las-sdk-browser
Copied!

Node version

1
$ yarn add @lucidtech/las-sdk-node
2
$ npm install @lucidtech/las-sdk-node
Copied!

Usage

1
import { Client } from '@lucidtech/las-sdk-core';
2
import { ClientCredentials } from '@lucidtech/las-sdk-node';
3
4
const credentials = new ClientCredentials('<apiEndpoint>', '<apiKey>', '<clientId>', '<clientSecret>', '<authEndpoint>');
5
const client = new Client(credentials);
6
7
const content = '<read image content>'
8
client.postDocuments(content, 'image/jpeg', '<consentId>').then(documentResponse => {
9
console.log(documentResponse);
10
}).catch(error => {
11
console.log(error);
12
})
Copied!

Contributing

Install dependencies
1
$ npm install && npm run upgrade-lucidtech
Copied!
Build
1
$ npm run build
Copied!
Run tests
1
$ npm run test test
Copied!
Last modified 9mo ago