@roadmapsh/scoop
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Scoop Node.js SDK

Node.js SDK for Roadmap Scoop for managing subscribers.

Getting Started

This SDK is written in TypeScript and is fully typed. It works with both TypeScript and JavaScript.

Install

Install @roadmapsh/scoop using your favorite package manager.

pnpm add @roadmapsh/scoop
# or
bun add @roadmapsh/scoop
# or
npm install @roadmapsh/scoop
# or
yarn add @roadmapsh/scoop

Setup

First generate an API key your hosted dashboard. Then, initialize the SDK with your API key.

import { Scoop } from '@roadmapsh/scoop';
export const scoop = new Scoop('your-api-key');

Usage

Subscribing to a list:

await scoop.subscribers.subscribe({
  email: 'john@doe.com',
  listId: 'list-id',
});

Unsubscribing from a list:

await scoop.subscribers.unsubscribe({
  email: 'john@doe.com',
  listId: 'list-id',
});

Assigning tags to a subscriber:

await scoop.subscribers.assignTags({
  email: 'john@doe.com',
  listId: 'list-id',
  addTags: ['tag-1', 'tag-2'],
});

Contributions

Feel free to submit pull requests, create issues, or spread the word.

License

MIT © Arik Chakma

Readme

Keywords

Package Sidebar

Install

npm i @roadmapsh/scoop

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

23.9 kB

Total Files

7

Last publish

Collaborators

  • kamranahmedse