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

gamanetsms

v1.0.10

Published

API para el envio de mensajes de texto SMS

Downloads

3

Readme

Quickstart

A sms module to send sms text ...

1. Install

npm install gamanetsms

2. Credentials (ES6 module syntax)

const GamanetSMS = require("gamanetsms");
const apicard = process.env.GAMANET_APICARD; // Your Apicard
const apikey = process.env.GAMANET_APIKEY;   // Your Apikey
const smstype = "0";
let gamanet = new GamanetSMS(apicard,apikey,smstype);

3. Send SMS

Example 1, simple message

const resp = gamanet.smssend("519000000000","hi your code is 86345");
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });

Example 2, attach image

const resp = gamanet.smssend("519000000000","hi attach image!","./public/files/logo_gama.png");
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });

Example 3, send bulk sms

let messages = [];
messages.push({smsnumber:"51900000000",smstext:"hi, first sms",messageid:"1"});
messages.push({smsnumber:"752853422",smstext:"hi, second sms",messageid:"2"});
messages.push({smsnumber:"219524334",smstext:"hi, any sms",messageid:"3"});

const resp = gamanet.smsbulk(messages);
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });

4. Report sms

Example, get info.

const messageid = "000001";
const resp = gamanet.reports(messageid);
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });

5. Balance

Example, get balance

const resp = gamanet.smsbalance();
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });

6. Generate PIN Code 2FA

Example, Generate Code

const number = "51900000000";
const applicationid = "123445"; // your aplicationid APP
const pinplaceholder = "CODE"; // Replace in text
const pinlength = "4";
const pintype = "alpha"; // alpha, numeric, alphanumeric
const text = "code is CODE"; //OK
const fail2voice = "0";

const resp = gamanet.sendpin(number,applicationid,pinplaceholder,pinlength,pintype,text,fail2voice);
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });

7. Verification PIN Code 2FA

Example,

const applicationid = "123445"; // your aplicationid APP
const pin = "3450";

const resp = gamanet.verifypin(pin,applicationid);
resp.then(result => {
          if(result.error){
              console.log(result.message);
          }else{
              console.log(result.data);
          }
     });