3.1.2 • Published 1 month ago

magicbell v3.1.2

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
1 month ago

MagicBell Node.js/JavaScript Library

This package provides a convenient interface to query the MagicBell API. Note that some methods depend on your secret key, those methods are not to be used in browsers, as your secret key must be kept secret.

Requirements

Node 18.13 or higher.

When using older versions, you might need to polyfill fetch. See isomorphic-fetch for more information.

You also might need to polyfill eventsource when using the listen method in an environment that doesn't support it. See eventsource for more information.

Installation

Install the package with npm:

npm install magicbell --save

or yarn:

yarn add magicbell

Usage

The package needs to be configured with your project's secret key & api key, which are available in the MagicBell Dashboard.

import { ProjectClient } from 'magicbell/project-client';

const magicbell = new ProjectClient({
  apiKey: 'your-api-key',
  apiSecret: 'your-api-secret',
});

try {
  const broadcast = await magicbell.broadcasts.create({
    title: 'Sweet!',
    content: 'When you see it, you know it!',
    recipients: [{ email: 'customer@example.com' }],
  });
  console.log(broadcast.id);
} catch (error) {
  console.error(error);
}

Documentation

Please see the MagicBell documentation for more information about this SDK.

3.1.2

1 month ago

3.1.1

3 months ago

3.1.0

4 months ago

3.0.1

5 months ago

3.0.0

6 months ago

2.3.0

8 months ago

2.4.1

6 months ago

2.4.0

7 months ago

2.3.1

7 months ago

1.7.2

12 months ago

1.8.0

11 months ago

2.2.0

9 months ago

2.0.2

10 months ago

2.1.0

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.7.1

1 year ago

1.4.4

1 year ago

1.7.0

1 year ago

1.4.3

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.2.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.3.0

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago