5.0.4 • Published 24 days ago

somleng v5.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
24 days ago

somleng-node

NPM

Build

Node.js helper library for Somleng's REST API.

Note: This library wraps Twilio Node and adds support for Somleng.

Versioning

somleng-node follows Twilio Node versioning.

Installation

npm install somleng or yarn add somleng

Sample Usage

// Client Initialization
const accountSid = process.env.SOMLENG_ACCOUNT_SID;
const authToken = process.env.SOMLENG_AUTH_TOKEN;
const client = require('somleng')(accountSid, authToken);

// Create a call
client.calls
  .create({
      twiml: '<Response><Say>Ahoy, World!</Say></Response>',
      to: '+14155551212',
      from: '+15017122661'
    })
  .then(call => console.log(call.sid));

// List calls
client.calls.list({limit: 20})
            .then(calls => calls.forEach(c => console.log(c.sid)));

Environment Variables

somleng-node supports credential storage in environment variables. If no credentials are provided when instantiating the Somleng client (e.g., const client = require('somleng')();), the values in following env vars will be used: SOMLENG_ACCOUNT_SID and SOMLENG_AUTH_TOKEN.

License

The software is available as open source under the terms of the MIT License.

5.0.4

24 days ago

5.0.3

1 month ago

5.0.2

1 month ago

5.0.1

2 months ago

5.0.0

2 months ago

4.23.0

2 months ago

4.22.0

3 months ago

4.20.2

4 months ago

4.20.1

4 months ago

1.0.0

5 months ago

4.21.1

5 months ago

4.21.0

5 months ago

4.19.0

7 months ago

4.20.0

5 months ago

4.18.1

7 months ago

4.15.0

9 months ago

4.14.1

10 months ago

4.17.0

8 months ago

4.18.0

8 months ago

4.12.0

11 months ago

4.13.0

11 months ago

4.11.2

12 months ago

4.14.0

10 months ago

4.11.1

12 months ago

4.11.0

1 year ago

4.10.0

1 year ago

4.9.0

1 year ago