passwallet

An implementation of Attido Mobile's PassWallet API

#About

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).

$ npm install passwallet
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*/);
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));
$ npm test