1.0.0 • Published 2 years ago
moorse-sdk v1.0.0
Moorse's software development kit
Quickstart
Create a node js project, and install the package.
$ npm i moorse
At typescript use import to get the moorse class with all the methods, the same can be done at es6.
import { Moorse } from "moorse";
async function useMoorse(pack) {
const moorse: Moorse = new Moorse({
channelType: pack.channel,
integrationId: pack.integrationId,
});
await moorse.login(pack.email, pack.password)
await moorse.sendText(pack.wanumber, pack.message);
}
Here, pack is an object like:
const pack = {
integrationId: "some-moorse-integration-id",
channel: "whatsapp",// <-- Unique communication channel for now
email: "sample.email@gmail.com",
password: "strongpass123",
wanumber: "destination-number",
message: "sample message"
};