0.0.3 • Published 4 months ago

awabah-hermes v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Hermes

npm npm NPM

About

This provides easy access to Hermes APIS. All are properly & fully tested. Available features include:

  • Notification: send email & send sms

Getting Started

Technologies · Installations · Usage · Components · Tests · Author

Technologies Used

  • 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

Installations

Getting started

  • You need to have your hermes secret key and NPM installed on your computer.

Setup

  • Installing the project dependencies

    Run the command below

    $ npm install awabah-hermes

Usage

$ const { Hermes } = require('awabah-hermes');
$ const  hermes = new Hermes('your-secret-key');

Components

  • 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
    })

Author

0.0.3

4 months ago

0.0.1

4 months ago

0.0.2

4 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago