# ideamart-sms-sdk

> A lightweight Node.js wrapper for IdeaMart IdeaPro SMS API.

Latest version **0.1.3** (published 2018-08-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install ideamart-sms-sdk
pnpm add ideamart-sms-sdk
yarn add ideamart-sms-sdk
bun add ideamart-sms-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2018-08-08 |
| First published | 2018-08-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nipuna H Herath |
| Maintainers | kr4ckhe4d |
| Keywords | ideamart, sms, api, dialog, node, nodejs, npm, ideapro |

## Links

- npm: https://www.npmjs.com/package/ideamart-sms-sdk
- Repository: https://github.com/kr4ckhe4d/ideamart.js
- Homepage: https://github.com/kr4ckhe4d/ideamart.js/tree/ideamart-sms-sdk
- Issues: https://github.com/kr4ckhe4d/ideamart.js/issues
- npm.io page: https://npm.io/package/ideamart-sms-sdk

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.18.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2018-08-08
- 0.1.2 — 2018-08-07
- 0.1.1 — 2018-08-07

## README

<!--
#
#Copyright (c) 2018 Nipuna H Herath
#
#Permission to use, copy, modify, and/or distribute this software 
#for any purpose with or without fee is hereby granted, provided 
#that the above copyright notice and this permission notice appear 
#in all copies.
#
#THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
#WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
#WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL 
#THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
#LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
#NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
#CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-->
# ideamart-sms-sdk  
## A lightweight Node.js wrapper for IdeaMart IdeaPro SMS API.

![alt text][banner]

# Installation
In your command-line on Windows:    
```bash    
    c:\> npm i ideamart-sms-sdk --save
```    
    
In your terminal on Mac OS X/Linux:
```bash    
    $npm i ideamart-sms-sdk --save
```

## How to use
In Node.js:
```js
// Load full IdeaMart SMS SDK build
const IdeaMart = require('ideamart-sms-sdk');

// Load SMSReceiver and SMSSender Modules separately
const SMSReceiver = IdeaMart.SMSReceiver;
const SMSSender = IdeaMart.SMSSender;

// Define the mandatory data that are needed for the API to function
const SERVER_URL = 'http://localhost:7000/sms/send';
const APP_ID = 'APP_000001';
const APP_PASSWORD = 'password';

// Create new sender instance to send a SMS.
const sender = new SMSSender.SMS(SERVER_URL, APP_ID, APP_PASSWORD);

// Sample route to test if the request response is working correctly.
app.post('/send', (req, res) => {
  // Extract the request data from request body using SMSReceiver module.
  const receiver = new SMSReceiver.SMS(req.body); 
  
  //Extract address and message from request body.
  const address = receiver.getAddress();
  const message = receiver.getMessage();

  // Send the SMS to the sender
  sender.sendSMS(message, address);
  // Return status for testing purposes when testing using Postman
  res.status(200).send(req.body);
});
```

## Dependencies

- [axios](https://www.npmjs.com/package/axios): Promise based HTTP client for the browser and node.js

## License

ISC

[banner]: http://www.ideamart.lk/web/wp-content/uploads/2016/10/ideaPro-01.svg "IdeaMart"

---
_Source: https://npm.io/package/ideamart-sms-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
