Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eurobate-sms

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eurobate-sms

Wrapper around the Eurobate APIs for JavaScript and TypeScript

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

JavaScript library for Eurobate SMS

npm version

This library provides a JavaScript/TypeScript wrapper around the Eurobate JSON APIs.

WARNING: Do not use this library from client side JavaScript, since you will make your password public.

It comes on two flavors.

  • Axios for Node.js (Do not use it in client side JavaScript in the browser)
  • Enonic XP

Usage in Node.js

Install with npm:

npm i eurobate-sms --save

You can now import the library and use the sendSMS function. The TypeScript typings will provide added code security when using it in IDEs.

const { sendSMS } = require('eurobate-sms');

sendSMS({
  messages: [
    {
      originator: 'Sender name',
      msisdn: '004740829232',
      message: 'Liten test'
    }
  ],
  user: "myUsername",
  password: "myPassword",
  simulate: 1,
  ttl: 3600
}).then(res => {
  console.log('Response from server:', res);
});

Usage in Enonic

Use npm to install the dependency.

npm i eurobate-sms --save
import { enonicSendSMS } from 'eurobate-sms';
import * as E from "fp-ts/lib/Either";

const response = enonicSendSMS({
  messages: [
    {
      originator: 'Sender name',
      msisdn: '004740829232',
      message: 'Liten test'
    }
  ],
  user: "myUsername",
  password: "myPassword",
  simulate: 1,
  ttl: 3600
});

E.fold(
  (res) => console.log('Response from server:', res),
  (e) => console.error('Error:', e)
)(response)

Building

To build the project run the following command:

npm run build

FAQs

Package last updated on 05 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc