pushed-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Pushed SDK

CI

Unofficial pushed.co JavaScript SDK. Has been created using The Pushed API Docs as reference.

Usage

Install the package:

npm install pushed-sdk

Get your credentials and intialize the class:

import Pushed from 'pushed-sdk';

const pushed = new Pushed({
	app_key: 'JIUHIdeijfoehyfwuijd',
	app_secret: 'JHIGUYTIKODmjwnhbgydfuwJOGkpdfijoeuhy8fuw9i0dowjhug8Y',
});

// Send notification to all users subscribed to app
await pushed.notifications.send({
	content: 'Hey from the pushed-sdk package!',
	content_extra: 'https://github.com/itaibo/pushed-sdk',
	content_type: 'url',
	target_type: 'app',
});

Readme

Keywords

Package Sidebar

Install

npm i pushed-sdk

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

7.75 kB

Total Files

10

Last publish

Collaborators

  • itaibo