Coder Social home page Coder Social logo

appzone-nodejs's Introduction

NodeJs Client for Appzone

Appzone is the only Cloud Telco Platform in Srilanka which operates on Etisalt Srilanka. This is 100% appzone compatible client library for NodeJs

Dependencies

  • NodeJS 0.4 +
  • npm 0.3 +

Installation

npm install appzone

Not Just A Dump API

Appzone for NodeJS is not a dump API which replicates the Appzone Core API but provides you a much cleaner interface to do what you wanted to do. Message retries will be happen behind the seen and avoid most of the tedious works from you.

Usage

import the library

var appzone = require('appzone');

Sending

var sender = appzone.sender('http://appzone-server', 'appId', 'password');

//sendSms
sender.sendSms('07223434', 'this is my message', function(err, resp) {
	//do what ever after message sent
});

//broadcastSms
sender.broadcastSms('broadcast message');

//sendUssd
sender.sendUssd('address', 'conversationId', 'message');

//sendUssdAndTerminate
sender.sendUssdAndTerminate('address', 'conversationId', 'message');

Receiving

var receiver = appzone.receiver('8734') //any port you like

//receive SMS
receiver.onSms(function(sms) {
	//sample sms object
	//{address: "234343", message: "dscdfHh", correlator: "434", version: "1.0"}
});

//receive USSD
receiver.onUssd(function(ussd) {
	//sample ussd object
	//{address: "234343", message: "dscdfHh", correlatationId: "434", conversationId: "343434394893", version: "1.0"}
});

//receive USSD termination
receiver.onUssdTerminate(function(ussd) {
	//sample ussd object (this doesn't have the message)
	//{address: "234343", correlatationId: "434", conversationId: "343434394893", version: "1.0"}
});

appzone-nodejs's People

Contributors

arunoda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sanyaade

appzone-nodejs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.