0.1.0 â€ĸ Published 8 months ago

@kernet/smsportal v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

ℹī¸ī¸ Description

This TypeScript library simplifies interaction with the SMSPortal API for sending SMS messages. It provides a convenient class, SmsPortal, that handles the API authentication and sending of SMS messages, making it easy to integrate SMS functionality into your TypeScript or JavaScript applications.

🔧 How to Install

Install using npm:

npm install @kernet/smsportal

Install using yarn:

yarn add @kernet/smsportal

Install using pnpm:

pnpm add @kernet/smsportal

👨đŸģ‍đŸĢ How to Use

Get full details

import { SmsPortal, SmsMessage , ApiResponse } from "@kernet/smsportal";

const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';

const smsClient = new SmsPortal(apiKey, apiSecret);

const messages: SmsMessage[] = [{ content: 'Hello SMS World from NodeJS', destination: phone }]

// ApiResponse is Implicit
smsClient.sendSMS(message)
  .then((response: ApiResponse) => {
    console.log("Success:");
    console.log(response);
  })
  .catch(error => {
    console.log("Failure:");
    console.error(error.message);
  });

💁đŸģ Contributing

This is an open source project. Any contribution would be greatly appreciated! Rename .env.example to .env and add your keys. This project uses pnpm.

0.1.0

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago