ideamart.js
A simple node.js wrapper for the IdeaMart IDEA-PRO APIs
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install ideamart.js --save
Usage
var IdeaMart = ; // Replace SMS with relevant functionvar SMS = applicationID: 'APP_000001' password: 'password' url: 'http://localhost:7000/sms/send';
APIs
SMS
var IdeaMart = ; // Replace SMS with relevant functionvar SMS = applicationID: 'APP_000001' password: 'password' url: 'http://localhost:7000/sms/send' webhook: '/mo-receiver' // Optional, defaults to '/mo-receiver'; SMS; // Is emitted when a text message is sent to the web applicationSMS; // Create an http server and run a webhook to recieve messageshttp;
Location
var IdeaMart = ; var Location = applicationID: 'APP_000001' password: 'password' url: 'http://localhost:7000/lbs/locate'; Location;
Subscription
var Subscription = applicationID: 'APP_000001' password: 'password' url: 'http://localhost:7000/subscription/' webhook: '/subscribe'; Subscription; Subscription; // Is emitted when a text message is sent to the web applicationSubscription; // Create an http server and run a webhook to recieve messageshttp;
TODO
- Implement proper error handling, based on the responses of the API.
- Implement SMS API
- Implement LBS API
- Implement USSD API
- Implement CaaS API
- Implement Subscription API
- Implement IVR API
Tests
No unit tests yet.
Dependencies
Dev Dependencies
None
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
License
ISC