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

venn-messaging

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

venn-messaging

Venn Messaging Redundancy Package, including Push Notifications, Email and SMS

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

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

Venn Email

Codeship Status for VennHQ/venn-email-node

Build in a redundant messaging service seamlessly. If your email, sms or push notification provider goes down, we'll fall back to a secondary service.

Installation

npm install venn-messaging

Email

initialize(api_key)
paramstypedescriptionexample
api_keyStringVenn API Key64d2fa24h3f6f7cc61asp3e8
send(data, callback)
paramstypedescriptionexample
data.fromStringfrom email addressfrom@email.com
data.toStringto email addressto@email.com
data.subjectStringemail subjectSubject 123
data.messageStringemail messageHow you doin?
Example
vennEmail = require("venn-messaging").Email;

// initialize and send an email
vennEmail.initialize(VENN_API_KEY);

var data = {
	from: "from@email.com",
	to: "to@email.com",
	subject: "Subject 123",
	message: "How you doin?"
};

vennEmail.send(data, function(err, result){
	// email successfully sent if no error
});

SMS

initialize(api_key)
paramstypedescriptionexample
api_keyStringVenn API Key64d2fa24h3f6f7cc61asp3e8
send(data, callback)
paramstypedescriptionexample
data.fromStringfrom phone number+14354402246
data.toStringto phone number+1633050227
data.messageStringtext messageHow you doin?
Example
vennSms = require("venn-messaging").SMS;

// initialize and send an SMS
vennSms.initialize(VENN_API_KEY);

var data = {
	from: "+14356650499",
	to: "+14503350029",
	message: "How you doin?"
};

vennSms.send(data, function (err, result) {
	// text successfully sent if no error
});

Push Notification

initialize(api_key)
paramstypedescriptionexample
api_keyStringVenn API Key64d2fa24h3f6f7cc61asp3e8
send(data, callback)
paramstypedescriptionexample
data.deviceTokenStringid of target deviceFE66489F304DC75B8D6E8200DFF8
data.deviceTypeStringtype of target deviceios
data.messageStringnotification messageHow you doin?
Example
vennPush = require("venn-messaging").Push;

// initialize and send a push notification
vennPush.initialize(VENN_API_KEY);

var data = {
	deviceToken: "FE66489F304DC75B8D6E8200DFF8",
    deviceType: "ios",
    message: "How you doin?"
};

vennPush.send(data, function (err, result) {
	// push notification successfully sent if no error
});

Development

Install Dependencies

npm install

Export Environment Variables

VENN_API_KEY="h41fa6602663b30c78b9c339"
VENN_API_URL="http://localhost:3400/v1"

Run Examples

node examples/example.js 

Run Examples with Debugging

VENN_API_KEY=5f6abf85d1947ce29ce7332f
VENN_API_URL=http://localhost:3400/v1
DEBUG="venn"
node examples/example.js

Run Tests

mocha

Adding a New Service Provider

  1. Write Failing Tests
  2. Create a new test file of the form test/service_type/service_name/error.js
  3. Copy test/template/test_service_template.js into this new file
  4. Follow instructions in the template file to create tests for the new service
  5. Create the New Service Provider
  6. Install the service provider's npm package as a dependency
  7. Create a new file of the form lib/models/providers/service_type/service_name.js
  8. Copy lib/models/providers/template/service_template.js into this new file
  9. Follow instructions in the template file to create the new service
  10. Edit lib/models/messaging_client.js
  11. Require the newly created service provider
var ServiceName = require('./providers/service_type/service_name');
  1. Add the newly created service provider to initServices
else if (property === "service_name" && keys[property]) {
	messagingProvider = new ServiceName(keys[property]);
}
  1. Add api key validator to Venn API

FAQs

Package last updated on 20 May 2015

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