cg-lc-api

1.3.0 • Public • Published

LoadCentral API

LoadCentral API wrapper for Node.js

☁️ Installation

# Using npm
npm install --save loadcentral-api

# Using yarn
yarn add loadcentral-api

📋 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);
    });
  }
);

❓ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.

  2. For bug reports and feature requests, open issues. 🐛

  3. For direct and quick help, you can use Codementor. 🚀

📝 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.

😋 How to contribute

Have an idea? Found a bug? See how to contribute.

💖 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:

  • PayPal—You can make one-time donations via PayPal. I'll probably buy a coffee tea. 🍵

  • Support me on Patreon—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! ❤️

📜 License

[MIT][license]

Package Sidebar

Install

npm i cg-lc-api

Weekly Downloads

4

Version

1.3.0

License

MIT

Unpacked Size

10.7 kB

Total Files

4

Last publish

Collaborators

  • techlover