getntified
v0.1.16
Published
A JavaScript client library for the Get Ntified platform.
Readme
getntified
A JavaScript client library for the Get Ntified platform.
Installation
npm install --save getntifiedGet Started (NPM)
- Create a new application
- Add the
getntifiedpackage to your project.npm install --save getntified
- Add this code to your service worker.
https://cdn.jsdelivr.net/npm/getntified/web/other/service-worker.js
Get Started (CDN)
- Create a new application
- Add the
getntifiedscript to your project.<script src="https://cdn.jsdelivr.net/npm/getntified/web/index.js"><script>
- Add this code to your service worker.
https://cdn.jsdelivr.net/npm/getntified/web/other/service-worker.js
Subscription Client API
import { SubscriptionClient } from 'getntified';
const subscriptionClient = new SubscriptionClient('application-id');
await subscriptionClient.subscribe();
// Optional
await subscriptionClient.setMeta({
emailAddress: '[email protected]',
fullName: 'Ricky Prescott',
});Notification Client API
import { NotificationClient } from 'getntified';
const notificationClient = new NotificationClient('application-id');
await notificationClient.sendSimple(
'Monday',
'Morning {{ fullName }}, heavy rain from this morning through the late night. You should take your umbrella today.',
'https://example.com',
);Author
License
This project is licensed under the MIT license. See the LICENSE file for more info.
