Can be used to communicate with a PushMe Server instance.
Client and Server side usage supported.
npm install @pushme-tgxn/pushmesdk
Client-side usage is used when you want to interact with a PushMe Server instance as a user.
import PushMeSDK from "@pushme-tgxn/pushmesdk";
const pushMe = new PushMeSDK();
const loggedIn = await pushMe.user.emailLogin("[email protected]", "Hunter2");
Server-Side usage can be used to send push notifications, and check for responses.
Send a Push message given a client secret.
import PushMeSDK from "@pushme-tgxn/pushmesdk";
const pushMe = new PushMeSDK();
const pushedMessage = await pushMe.user.pushToTopic(topicSecret, {
title: "Hello World!",
body: "This is a test message."
});
Library Build inspired by https://github.com/uuidjs/uuid/tree/main