Skip to content

WiFire/omrs-checkmobi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omrs-checkmobi

Checkmobi NPM module. Modified to bypass issue with E164 validation and fix broken tests

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install omrs-checkmobi --save

Example

let CheckMobi = require('omrs-checkmobi');
let cb = new CheckMobi('YOUR_CHECKMOBI_SECRET_KEY');

cb.getCountries((error, countries) => {
  if(!error) {
    console.log(countries);
  }
});

Available Methods

  • getCountries(callback)

    • allow you to get a list of all available countries, flags and country code.
  • getMessageInformation(messageId, callback)

    • Get SMS status, let you to check the status of a sms request
  • getPrefixes(callback)

    • Send API allow you to get a list of all available countries and the associated calling prefixes
  • getValidateStatus(validateId, callback)

    • Get Validation status API let you to check the validation status of a request
  • phoneInformation(phnumber, callback)

    • Send API request to get phone/mobile information
  • sendMessage(messageObject, callback)

    • API request to send message on phone/mobile
    • messageObject has following required properties
      • to: Phone/Mobile Number should be in E.164 format
      • text: Message, maximum 255 chars allowed
  • validatePhone(phNumber, verifyAs, callback)

    • Validate phone/mobile number via sending message on given phone number with an OTP
  • validatePin(validateId, validateText, callback)

    • Validate PIN send on phone / mobile number by using validatePhone

Tests

npm install
npm test

Dependencies

  • request: Simplified HTTP request client.

Dev Dependencies

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • mocha: simple, flexible, fun test framework

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Makefile 0.4%