@logi.one/document-client
TypeScript icon, indicating that this package has built-in type declarations

0.2.8 • Public • Published

LogiONE Document Client

This is a client for the LogiONE Document's API.

www.logi.one/document

Install

npm install @logi.one/document-client

Quick start

You can use createLogiONEDocumentClient to create a client instance.

It will try to read the API key from the .logione-document-api-token file. If it doesn't find the file, it will read the api token from the environment key: LOGIONE_DOCUMENT_API_TOKEN. If it is not set, it will ask for the API key from the command line. The client will automatically refresh the token when it expires and save it to the .logione-document-api-token file.

const { createLogiONEDocumentClient } = require('@logi.one/document-client')

async function run() {    
    const client = await createLogiONEDocumentClient()     
    const documents = await client.search('documents', { limit: 10, columnFilters: [{ column: 'extension', value: 'docx', match: true }] })     
    console.table(documents)
}

run()

Need for support

If you need support, please feel free to contact us at info@logi.one. We will be happy to help you.

Package Sidebar

Install

npm i @logi.one/document-client

Weekly Downloads

1

Version

0.2.8

License

ISC

Unpacked Size

27.1 kB

Total Files

13

Last publish

Collaborators

  • yenyen