1.0.27 • Published 2 years ago

hermeslib v1.0.27

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

HERMESJS

  • Library for polling Hermes messages.

Install

npm install hermeslib

or

yarn add hermeslib

Usage

import React from "react";
import "react-notifications/lib/notifications.css";
import { Cron } from "hermeslib";

function App() {
  return (
    <div>
      <Cron
        endpoint="https://localhost:8080/poll/{recipient}"
        cronTime="0/30 * * * * *" //Run every 30 seconds
        defaultNotification
        callback={(err, data) =>
          console.log(`error: ${err}, data: ${data}`)
        }
      />
    </div>
  );
}

export default App;

Properties

NameTypeRequiredDefaultDescription
endpointstringtrue-Endpoint to poll messages
cronTimestringfalse* * * * *Cron time string format (https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
callbackfunctionfalse-Function that will be called after receiving a message. (error: boolean, data: object)
defaultNotificationbooleanfalsefalseDisplays the default notifications imbedded in the library

Default Notification

1.0.19

2 years ago

1.0.18

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.27

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.14

2 years ago

1.0.12

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago