1.4.0 • Published 2 months ago

@print-one/print-one-js v1.4.0

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

Print-one.js

npm package Build Status Issues Semantic Release

The official javascript client for Print.one

Installation

npm install @print-one/print-one-js

Example

import { PrintOne } from '@print-one/print-one-js'

const client = new PrintOne("<YOUR API TOKEN>");

const templates = await client.getTemplates();
const template = templates[0];

const order = await client.createOrder({
    recipient: {
        name: "John Doe",
        address: "Example Street 2",
        city: "Anytown",
        postalCode: "1234AB",
        country: "NL",
    },
    template: template,
    // All other options are optional
    sender: {
        name: "Jane Doe",
        address: "Example Street 1",
        addressLine2: "Apt 1",
        city: "Anytown",
        postalCode: "1234AB",
        country: "NL",
    },
    finish: Finish.GLOSSY,
    mergeVariables: {
        couponCode: "ABC123"
    },
    billingId: "8073",
    sendDate: "2021-01-01",
});

const download = await order.download();

fs.writeFileSync("order.pdf", download);

Help

  • For documentation and more examples, see the documentation.
  • With problems, questions or suggestions, please file an issue.
  • For other questions, feel free to contact us at our support page.
1.4.0-next.2

2 months ago

1.4.0

2 months ago

1.3.0-next.2

4 months ago

1.3.0-next.3

4 months ago

1.3.0-next.1

6 months ago

1.4.0-next.1

3 months ago

1.3.0

4 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.2.0-next.1

9 months ago

1.1.0

10 months ago

1.0.0

11 months ago

0.0.1

11 months ago