This provides easy access to Hermes APIS. All are properly & fully tested. Available features include:
- Notification: send email & send sms
Technologies · Installations · Usage · Components · Tests · Author
- ESLint - A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
- Jest - Jest is a JavaScript testing framework maintained by Facebook, Inc. designed and built by Christoph Nakazawa with a focus on simplicity and support for large web applications.
- Airbnb style guide was followed.
- TypeScript
- You need to have your hermes secret key and NPM installed on your computer.
- Installing the project dependencies
Run the command below
$ npm install awabah-hermes
$ const { Hermes } = require('awabah-hermes');
$ const hermes = new Hermes('your-secret-key');
- Notification
- Send Email
const { Hermes } = require('awabah-hermes'); const hermes = new Hermes('your-secret-key'); const attachment = { filename: string; content: string; encoding: string; } const data = { from: 'hello@awabahng.com', // required subject: 'testing package', // required to: ['tina@awabahng.com'], // required html: 'hello testing package', // required attachments?: attachment // not required } const response = await hermes.notification.sendEmail(data)
- Send sms
const { Hermes } = require('awabah-hermes'); const hermes = new Hermes('your-secret-key'); const response = await hermes.notification.sendSms({ phoneNumber: '+2348160190214', // required message: 'testing package', // required })