GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - appzer/nodeJS-pushsafer: Send pushsafer.com push notifications from Node.JS

BranchesTags
Open more actions menu

Latest commit

 

History

53 Commits
53 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

Pushsafer

Send pushsafer.com notifications from Node.JS

Pushsafer make it easy and safe to get push-notifications in real time on your

  • Android device
  • iOS device (incl. iPhone, iPad, iPod Touch)
  • Windows Phone & Desktop
  • Browser (Chrome & Firefox)

API description

Usage

Install

npm install pushsafer-notifications

Pushsafer API values

Any API parameters, as found on https://www.pushsafer.com/en/pushapi, can be passed in the object. Here's an example with many different parameters.

var msg = {
	m: 'This is a Node.js test message',   // Message (required)
	t: "Node.js Test",                     // Title (optional)
	s: '8',                                // Sound (value 0-60) (optional)
	v: '2',                                // Vibration (empty or value 1-3) (optional)
	i: '5',                                // Icon (value 1-177) (optional)
	c: '#FF0000',                          // Icon color hexadecimal color code (optional) 
	d: '221',                              // Device or Device group id (optional)
	u: 'https://www.pushsafer.com',        // an URL (optional)
	ut: 'Pushsafer.com',                   // URLs title (optional)
	l: '10',                               // Time to Live (optional: 0-43200 minutes)
	pr: '2',                               // Priority (optional: -2, -1, 0, 1, 2)
	re: '60',                              // Retry (optional: 60-10800 seconds)
	ex: '60',                              // Expire (optional: 60-10800 seconds)
	cr: '20',                              // Confirm (optional: 10-10800 seconds)
	a: '1',				       // Answer
	ao: 'yes|no|maybe',		       // Answer Options seperated by a pipe character
	af: '1',			       // Force Answer
	p: '',                                 // Image converted to > Data URL with Base64-encoded string (optional)
	p2: '',                                // Image 2 converted to > Data URL with Base64-encoded string (optional)
	p3: ''                                 // Image 3 converted to > Data URL with Base64-encoded string (optional)
};

Examples

Sending a message

var push = require( 'pushsafer-notifications' );

var p = new push( {
	k: 'Your20CharPrivateKey',             // your 20 chars long private key or 15 chars long alias key  (required)
	debug: true
});

var msg = {
	m: 'This is a Node.js test message',   // Message (required)
	t: "Node.js Test",                     // Title (optional)
	s: '8',                                // Sound (value 0-28) (optional)
	v: '2',                                // Vibration (empty or value 1-3) (optional)
	i: '5',                                // Icon (value 1-98) (optional)
	c: '#FF0000',                          // Icon color hexadecimal color code (optional)
	d: '221',                              // Device or Device Group id (optional)
	u: 'https://www.pushsafer.com',        // an URL (optional)
	ut: 'Pushsafer.com',                   // URLs title (optional)
	l: '10',                               // Time to Live (optional)
	pr: '2',                               // Priority (optional: -2, -1, 0, 1, 2)
	re: '60',                              // Retry (optional: 60-10800 seconds)
	ex: '60',                              // Expire (optional: 60-10800 seconds)
	cr: '20',                              // Confirm (optional: 60-10800 seconds)
	a: '1',                                // Answer
	ao: 'yes|no|maybe',                    // Answer Options seperated by a pipe character
	af: '1',                               // Force Answer
	p: '',                                 // Image converted to > Data URL with Base64-encoded string (optional)
	p2: '',                                // Image 2 converted to > Data URL with Base64-encoded string (optional)
	p3: ''                                 // Image 3 converted to > Data URL with Base64-encoded string (optional)
};

// console.log( p );

p.send( msg, function( err, result ) {
	//console.log( 'ERROR:', err );
	console.log( 'RESULT', result );
	// process.exit(0);
});

About

Send pushsafer.com push notifications from Node.JS

www.pushsafer.com

Topics

androidiosipadiphonenode-jsnodejsnotificationnotificationspushpush-notificationspushnotificationpushnotificationspushsaferwin10windows

Resources

Readme
License
Activity

Stars

3 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.