@picturelink/clicksend
TypeScript icon, indicating that this package has built-in type declarations

5.0.59-r2 • Public • Published

A fork of the official nodejs library for ClickSend v3 REST API

This is a fork of the official ClickSend SDK. Documentation can be found here.

Differences from the offical version:

  • Removes bluebird dependency as it isn't necessary for compiling.
  • Distributes a compiled version of the package so compilation after installation is no longer necessary.
  • Installs dependencies when installing (see Issue #1).

Requirements

Installation

Downloading Package

To download the SDK into your package run the command:

npm i clicksend

Adding SDK into your project

Copy the api.js file along with the node_modules directory into your project to use the library, and include this in your file to use the SDK:

var api = require('./node_modules/clicksend/api.js');

Documentation

Documentation for our SDK and REST API can be found here.

Getting Started (sms/send example)

Please follow the installation procedure and then run the following code:

var api = require('./api.js');

var smsMessage = new api.SmsMessage();

smsMessage.from = "myNumber";
smsMessage.to = "+0451111111";
smsMessage.body = "test message";

var smsApi = new api.SMSApi("username", "api_key");

var smsCollection = new api.SmsMessageCollection();

smsCollection.messages = [smsMessage];

smsApi.smsSendPost(smsCollection).then(function(response) {
	console.log(response.body);
}).catch(function(err){
	console.error(err.body);
});

Readme

Keywords

Package Sidebar

Install

npm i @picturelink/clicksend

Weekly Downloads

31

Version

5.0.59-r2

License

ISC

Unpacked Size

1.05 MB

Total Files

5

Last publish

Collaborators

  • john.bayly