0.0.8 • Published 1 year ago

@adlanarifzr/macrokiosk-sdk v0.0.8

Weekly downloads
-
License
Unlicense
Repository
github
Last release
1 year ago

Macrokiosk (BOLD for SMS) unofficial SDK

This repository contains the open source Node.js client for Macrokiosk's API.

Installation

npm install @adlanarifzr/macrokiosk-sdk

Usage

Typescript with ES6 import (or .mjs with Node >= v13):

import Macrokiosk, { MessageType, SendMessageOptions, SendMessageResult } from '@adlanarifzr/macrokiosk-sdk';
const macrokiosk = new Macrokiosk('<USERNAME>', '<PASSWORD>', '<SENDER_ID>', '<SERVICE_ID>');

Send message:

// Options is optional
const options: SendMessageOptions = {
    type: MessageType.ASCII,
    showDetail: true,
};
const result: SendMessageResult = await macrokiosk.sendMessage(['<MOBILE_NUMBER>'], 'This is just a test', options);

// Result object:
{
  recipients: {
    '60123456789': {
      messageId: '24677783439',
      status: 200,
      description: 'Successful',
      currency: 'MYR',
      chargedAmount: 0.072
    }
  },
  remainingBalance: 0,
  totalRecipients: 1
}

Notes

Other than MessageType.ASCII, you would need to format/encode the message based on the documentation.

0.0.8

1 year ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago