websheet-js
v1.0.2
Published
SDK to websheet api
Downloads
6
Readme
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)
- 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
- 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, '[email protected]')
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
- 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,'[email protected]','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)
- 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
- 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, '[email protected]')
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
- 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,'[email protected]','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