1.0.2 • Published 2 years ago

websheet-js v1.0.2

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

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