2.0.0 • Published 4 years ago

ghasedak-node v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

install

You can simply install and use ghasedak nodejs library from npm:

npm install --save ghasedak-node

or from yarn:

yarn install ghasedak-node

usage

Import ghasedak package:

const Ghasedak = require("ghasedak");

You need a Ghasedak account. Register and get your API key.

Create an instance from Ghasedak with your API key:

let ghasedak = Ghasedak(
  "3ef8539ba50c06b2a11d674c8a7ded7d7360d7b090b5146ff0761e8d9927bd31"
);

with promise

ghasedak
  .send({
    message: "Hello World!",
    receptor: "09xxxxxxxxx",
    linenumber: "300002525"
  })
  .then(res => {
    // ... check documentation for response type
    // https://ghasedak.io/docs
  })
  .catch(error => {});

with async/await

async () => {
  try {
    await ghasedak.send({
      message: "Hello World!",
      receptor: "09xxxxxxxxx",
      linenumber: "300002525"
    });
  } catch (e) {}
};
2.0.0

4 years ago

0.1.0

4 years ago