@roadmapsh/scoop
v0.0.1
Published
NodeJS sdk for Scoop
Downloads
13
Readme
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/scoopSetup
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: '[email protected]',
listId: 'list-id',
});Unsubscribing from a list:
await scoop.subscribers.unsubscribe({
email: '[email protected]',
listId: 'list-id',
});Assigning tags to a subscriber:
await scoop.subscribers.assignTags({
email: '[email protected]',
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
