eventique-push

1.0.3 • Public • Published

Eventique SDK

The Eventique SDK is a Node.js package designed to facilitate communication between your server and client applications. It allows you to send actions to your app, such as notifying it of a new update, clearing a shopping cart, or any other action that requires immediate attention. By using this SDK, you can avoid the need for your app to constantly poll the server for updates, reducing network traffic and improving overall efficiency.

Get your api key here

Installation

Install the package using npm:

npm install eventique-push

Usage

First, import the EventiqueClient class from the package and initialize it with your API key:

const EventiqueClient = require('eventique-push');

const eventique = new EventiqueClient({ apiKey: 'your-api-key' });

Then, you can push actions to your app using the push method:

eventique.push({ deviceId: 'device-id', action: 'remove_cart' })
  .then(response => {
    console.log('Action pushed successfully:', response);
  })
  .catch(error => {
    console.error('Error pushing action:', error);
  });

API

new EventiqueClient(config)

Creates a new EventiqueClient instance.

  • config: Object
    • apiKey: String - Your API key for the Eventique API.

eventique.push(options)

Pushes an action to your app.

  • options: Object
    • deviceId: String - The device ID to target.
    • action: String - The action to be pushed.
  • Returns: Promise - Resolves with the server response or rejects with an error.

Benefits

  • Reduce Polling: By using the Eventique SDK, your app no longer needs to constantly poll the server for updates. Instead, it can react to push notifications, leading to more efficient use of network resources and a better user experience.
  • Targeted Actions: Specify the device ID to ensure that actions are delivered to the intended recipient, allowing for precise control over your app's behavior.
  • Easy Integration: The SDK is designed to be easy to integrate into your existing Node.js projects, with a simple API and clear documentation.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i eventique-push

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.09 kB

Total Files

3

Last publish

Collaborators

  • giftretyu