pushed-sdk
v1.0.2
Published
Unofficial pushed.co JavaScript SDK
Downloads
2
Readme
Pushed SDK
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',
});