npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adasms-sdk

v0.1.11

Published

Non-Official ADASMS Client SDK

Downloads

3

Readme

Test CI GitHub release License issues - adasms-sdk

adasms-sdk

This is Non-Official a AdaSMS SDK.

https://nodei.co/npm/adasms-sdk.png?downloads=true&downloadRank=true&stars=true

| Statements | Branches | Functions | Lines | | --------------------------- | ----------------------- | ------------------------- | ----------------- | | Statements | Branches | Functions | Lines |

AdaSMS

The Best SMS Provider for Business Adasms gives you the best for business experience with all the features you need. The days of overpriced SMS is over, our price is as low as MYR 0.08/SMS to all networks. Free to register and no account fees.

Sign-up at https://terminal.adasms.com/register and get started as low as MYR 10.00!

MYR 10 = 10,000 Credits

MYR 50 = 50,000 Credits

Features/Functions

  • Rate: MYR 0.08/SMS to all networks
  • Core Functions:
    • sendSMS()
    • getCreditBalance()
    • listScheduledMessage()
    • deleteScheduledMessage()
  • Phonebook Features:
    • createLead()
    • getLeads()
    • deleteLead()
    • createContact()
    • getContactList()
    • deleteContact()

Installing

Environment Variable

.env

ADASMS_APPLICATION_SECRET=<your-adasms-application-secret>

Package Manager

Using npm:

$ npm install adasms-sdk

Using bower:

$ bower install adasms-sdk

Using yarn:

$ yarn add adasms-sdk

Using pnpm:

$ pnpm add adasms-sdk

Once the package is installed, you can import the library using import or require approach:

import { Client } from 'adasms-sdk'

You can also use the default export, since the named export is just a re-export from the adasms-sdk factory:

import Client from 'adasms-sdk'

If you use require for importing, only default export is available:

const Client = require('adasms-sdk')

Example

es6

import { Client } from 'adasms-sdk'

const client = new Client()
/**
 *  If you prefer to hardcode token (not secure)
 *  const client = new Client({ token: <your-adasms-application-secret> })
 */

const response = await client.getCreditBalance()
console.log(response.balance)
// output: { balance: 10000 }

Typescript

import Client, { ClientOption, SendSMSObject } from 'adasms-sdk'

const option: ClientOption = {
    token: process.env.ADASMS_APPLICATION_SECRET
}
const client = new Client(option)

const params: SendSMSObject = {
    phone: "60199126212",
    message: "Hello from adasms-sdk",
    previewMode: true, // dry-run
}
const response = await client.sendSMS()
console.log(response)
/**
 * { "success": true, 
 *      "message": {
 *          "message": "Hello from @adasms\/client",
 *          "price": 80,
 *          "length": 25,
 *          "total_sent": 1,
 *          "recipients": 1,
 *          "phones": ["+60199126212"],
 *          "message_per_recipient": 1,
 *          "send_at": null,
 *          "lead_id": null,
 *          "preview": true
 *      }
 *  }
 */ 

Contributing

I am open to, and grateful for, any contributions made by the community. By contributing to this repo, you agree to abide by the code of conduct.