3.2.0 • Published 2 years ago

binect v3.2.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

binect

Typescript Axios Wrapper for binect.de API

The documentation for the different endpoints can be found here.

Usage:

import { Configuration, SendingsApi, SendDocumentRequest } from 'binect';
import { readFile } from 'node:fs/promises';

// create a shared configuration for the apis
const configuration = new Configuration({
    username: '<username>',
    password: '<password>',
});

const sendingsApi = new SendingsApi(configuration);

// read pdf file as base 64 encoded string
readFile('./letter-example.pdf', {encoding: 'base64'}).then(async (data) => {
    const shipping: SendDocumentRequest = {
        content: {
            filename: 'example.pdf',
            content: data,
        },
        options: { // print one-sided black and white
            simplex: true,
            color: false,
        },
    };

    const sendingResult = await sendingsApi.sendDocument(shipping);

    console.log(sendingResult.data);
});

Find more example usages in the examples directory.

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago