passwallet

0.1.0 • Public • Published

#About Build Status

passwallet is a Connect and Express middleware for Attido Mobile's PassWallet API.

Think Apple's iOS Passbook for the rest of us (currently supports Android and BlackBerry, others to follow).

Installation

$ npm install passwallet

Usage

var express = require('express'),
	passwallet = require('passwallet');

var app = express()
		.use(passwallet.middleware());

// when models have loaded
passwallet.loadPass(Pass/*Some model*/);
passwallet.loadPass(Registration/*Some model*/);
passwallet.loadPass(Device/*Some model*/);

Required functions

Pass.pwFind = function ({
	passTypeIdentifier: ?,
	serialNumber: ?
}, function (err, pass));

Registration.pwFind = function ({
	deviceLibraryIdentifier: ?,
	passTypeIdentifier: ?,
	serialNumber: ?
}, function (err, registration));

Registration.pwCreate = function ({
	deviceLibraryIdentifier: ?,
	passTypeIdentifier: ?,
	serialNumber: ?
}, function (err, registration));

Device.pwFind = function ({
	deviceLibraryIdentifier: ?
}, function (err, registration));

Device.pwCreate = function ({
	deviceLibraryIdentifier: ?,
	pushToken: ?,
	pushServiceUrl: ?
}, function (err, registration));

Run tests

$ npm test

Credits

/passwallet/

    Package Sidebar

    Install

    npm i passwallet

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • mayeskennedy