0.2.3 • Published 2 years ago

paperless v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

API Client for paperless-ng

Installation

# yarn
yarn install paperless

# NPM
npm install paperless

Usage

Here are some examples how this library works. Since it is fully typed I won't explain every method here. Just dive into the types and you're ready to roll. Also note that not all functions are available right now. Mostly GET functions work.

import { Paperless } from 'paperless';

const paperless = new Paperless({
  username: 'dunklestoast',
  password: 'mucho_secret',
  host: 'paperless.example.com',
  port: 1337,
});

// Get a document by Id
const document = await paperless.getDocument(2);

// Download a document
const file = await paperless.downloadDocument(2);
fs.writeFileSync(`${document.title}.pdf`, file);

// Get a documents thumbnail
await paperless.getThumbnail(2);

React Native

This package is compatible with React Native. However, the ignoreSSL feature is not supported and will throw errors, if you set this to true.

0.2.3

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.2

3 years ago

0.1.0

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.4

3 years ago

0.0.1

3 years ago