@logi.one/document-client
v0.2.8
Published
Client for LogiONE Document's API
Downloads
48
Maintainers
Readme
LogiONE Document Client
This is a client for the LogiONE Document's API.
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 [email protected]. We will be happy to help you.