0.0.1 • Published 3 months ago

@roadmapsh/scoop v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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

0.0.1

3 months ago