0.2.0 • Published 9 years ago

ridematcher v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

ridematcher

build status

Find carpool/vanpool matches within a commuter population

findMatches(commuters, opts)

Make a SOAP request to Commuter Connections to get the number of carpools available for a given starting, ending location, and search radius.

Parameters

parametertypedescription
commutersArrayArray of commuters to match to each other
optsObjectOptions object

Example

import {findMatches} from 'commuter-connections'
findMatches({
  commuters: [{
    _id: 1,
    from: [-77.4875, 39.0436],
    to: [..]
  }], {
    radius: .5,
    units: 'miles'
}}).then((matches) => {
    console.log(matches) // map of commuter id's to matching commuter id's
}, handleError)

Returns Promise, promise

Installation

Requires nodejs.

$ npm install ridematcher

Tests

$ npm test