websheet-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

WebSheet SDK (WIP)

This package software allow generates pdf (and send it by email) using our services with content in HTML.

Installation

 $ npm install websheet-js
 // or
 $yarn add websheet-js

Usage (JS)

Creates an API Key on https://www.websheet.tech. (No credit card need)

  1. Generate PDF file
import Pdf from "websheet"

const client = new Pdf({
    apiKey: 'api-key'
})
const content = '<h1>Teste em TS 2</h1>'
const result  = await client.make('pdf em ts', content)

console.log(result.id); // ID of file
console.log(result.name); // Name of file
console.log(result.url); // URL of created PDF file
console.log(result.createdAt);// Creation date of Pdf file
  1. Generate PDF file and send for email
import Pdf from "websheet"

const client = new Pdf({
    apiKey: 'api-key'
})
const content = '<h1>Teste em TS 2</h1>'
const result  = await client.make('pdf em ts', content, 'bob@email.com')

console.log(result.id); // ID of file
console.log(result.name); // Name of file
console.log(result.url); // URL of created PDF file
console.log(result.createdAt);// Creation date of Pdf file
  1. Generate PDF file and send for email with your own email template (some plans).
import Pdf from "websheet"

const client = new Pdf({
    apiKey: 'api-key'
})
const content = '<h1>Teste em TS 2</h1>'
const result  = await client.make('pdf em ts', content,'bob@email.com','Template ID')

console.log(result.id); // ID of file
console.log(result.name); // Name of file
console.log(result.url); // URL of created PDF file
console.log(result.createdAt);// Creation date of Pdf file

Usage (TS)

Creates an API Key on https://www.websheet.tech. (No credit card need)

  1. Generate PDF file
import Pdf, {PdfResult} from "websheet"

const client = new Pdf({
    apiKey: 'api-key'
})
const content: string = '<h1>Teste em TS 2</h1>'
const result: PdfResult  = await client.make('pdf em ts', content)

console.log(result.id); // ID of file
console.log(result.name); // Name of file
console.log(result.url); // URL of created PDF file
console.log(result.createdAt);// Creation date of Pdf file
  1. Generate PDF file and send for email
import Pdf, {PdfResult} from "websheet"

const client = new Pdf({
    apiKey: 'api-key'
})
const content: string = '<h1>Teste em TS 2</h1>'
const result: PdfResult  = await client.make('pdf em ts', content, 'bob@email.com')

console.log(result.id); // ID of file
console.log(result.name); // Name of file
console.log(result.url); // URL of created PDF file
console.log(result.createdAt);// Creation date of Pdf file
  1. Generate PDF file and send for email with your own email template (some plans).
import Pdf , {PdfResult}from "websheet"

const client = new Pdf({
    apiKey: 'api-key'
})
const content: string = '<h1>Teste em TS 2</h1>'
const result: PdfResult  = await client.make('pdf em ts', content,'bob@email.com','Template ID')

console.log(result.id); // ID of file
console.log(result.name); // Name of file
console.log(result.url); // URL of created PDF file
console.log(result.createdAt);// Creation date of Pdf file

Readme

Keywords

Package Sidebar

Install

npm i websheet-js

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

10.7 kB

Total Files

11

Last publish

Collaborators

  • igor