cg-lc-api
v1.3.0
Published
LoadCentral API wrapper for Node.js
Downloads
6
Maintainers
Readme
LoadCentral API
LoadCentral API wrapper for Node.js
:cloud: Installation
# Using npm
npm install --save loadcentral-api
# Using yarn
yarn add loadcentral-api
:clipboard: Example
var LoadCentral = require("../lib");
var uid = process.env.LOADCENTRAL_UID;
var password = process.env.LOADCENTRAL_PASSWORD;
var rrn = "ABC" + parseInt(Math.random() * (1000000 - 1000) + 1000);
var loadCentral = new LoadCentral({
uid: uid,
password: password,
});
loadCentral.sell(
{
pcode: "ZTEST1",
to: "09180000001",
rrn: rrn,
},
function (err, body, res) {
console.log(err || body);
loadCentral.inquire(rrn, function (err, body, res) {
console.log(err || body);
});
}
);
:question: Get Help
There are few ways to get help:
Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
For bug reports and feature requests, open issues. :bug:
For direct and quick help, you can use Codementor. :rocket:
:memo: Documentation
You can see below the API reference of this module.
LoadCentral(options)
Creates the instance of the LoadCentral
class.
sell(params, cb)
Sell Product Request.
Params
Object
params
: The Sell Product api parameters containing but not limited to:pcode
(String): Product code to be sold (mandatory) (list of products here).to
(String): Buyer's PH 11 digit mobile number ex. 09180000001 or 639180000001 (mandatory).rrn
(String): Retrieval Reference Number. Must have 3 letter company prefix ex. ABC1234567890 (mandatory).Function
cb
: The callback function.
inquire(rrn, cb)
Send SMS by Group ID
Params
- String
rrn
: Retrieval Reference Number. Must have 3 letter company prefix ex. ABC1234567890 (mandatory). - Function
cb
: The callback function.
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.
:sparkling_heart: Support my projects
I do web services and open-source my used projects as much as I can. I will try to reply to everyone needing help using these projects. It consumes a lot of time and hardwork. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
Bitcoin—You can send me bitcoins at this address (or scanning the code below):
344FWmvxDt6FFFoYoFjftiT3gGus68AqNw
Thank you! :heart:
:scroll: License
[MIT][license]