GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - useplunk/node: Helper library for interacting with Plunk in Node.js

BranchesTags
Open more actions menu

Latest commit

 

History

51 Commits
51 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
__tests__
__tests__
 
 
src
src
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.prettierrc
.prettierrc
 
 
README.md
README.md
 
 
jest.config.js
jest.config.js
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.test.json
tsconfig.test.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Plunk Node.js

This project contains the helper library for interacting with the Plunk API using Node.js.

Table of contents

  • Installation
  • Getting started
  • API
    • Events
    • Email

Card

Installation

Installing the latest version can be done through your package manager.

npm i @plunk/node

yarn add @plunk/node

Getting started

Any interaction you want to make with the Plunk API needs to be done through the Plunk client. You can use a default import to get started.

import Plunk from '@plunk/node';

// Using the default API URL
const plunk = new Plunk("Your secret key");

// Or specifying a custom API URL
const plunkCustom = new Plunk("Your secret key", { baseUrl: "https://selfhosted.example.com/api/v1/" });

API

Events

track()

Used to publish an event

Parameters
  • event: The name of the event to publish
  • email: The email address of the user to publish the event to
  • subscribed [Optional]: Whether to the contact is subscribed to marketing emails, defaults to true
  • data [Optional]: An object containing the data to attach to the user
const success = await plunk.events.track({
  event: "new-project",
  email: "[email protected]",
  data: {
    company: "Plunk"
  }
});

Emails

send()

Used to send a transactional email

Parameters
  • to: The email address of the recipient
  • subject: The subject of the email
  • body: The body of the email
  • type [Optional]: The type of email to send (html or markdown)
  • from [Optional]: The email address of the sender
  • name [Optional]: The name of the sender
  • subscribed [Optional]: Whether to the contact is subscribed to marketing emails, defaults to false
const success = await plunk.emails.send({
  to: "[email protected]",
  subject: "Welcome to Plunk",
  body: "Hello world!",
});

About

Helper library for interacting with Plunk in Node.js

www.npmjs.com/package/@plunk/node

Resources

Readme
Activity
Custom properties

Stars

25 stars

Watchers

0 watching

Forks

9 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.