0.1.3 • Published 8 years ago

node-clippercard v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

ClipperCard Parser

Unofficial Node.js library to retrieve and parse profile and activity data from the Bay Area's Clipper Card system.

Build Status Node Version NPM Version NPM Downloads

#Usage

This library works by emulating a user logging on through the ClipperCard website. The library attempts to be as polite as possible when dealing with the website - minimizing the traffic and being respectful of the site. Regardless, please familiarize yourself with their Terms of Use before using this library so you can ensure that you are using this in accordance with their policies.

The default User-Agent string for this library identifies itself as this Node.js module, so the site administrators can easily identify the traffic if necessary. The goal of this library is not to misuse the site, but merely to provide easy access to the data within. If and when there is a ClipperCard API available, I will switch this library over to that.

Your use of this library is entirely at your own risk.

#Installation

To get started, simply install the module using npm:

npm install node-clippercard

and then require it:

var ClipperAccount = require('node-clippercard');

or using ES6 imports:

import ClipperAccount from 'node-clippercard'

#Classes

This library exposes classes called ClipperAccount and ClipperStatement.

##ClipperAccount

This is intended to be the primary access point for the library. It provides the login() capability needed to access the account.

###new ClipperAccount(options)

  • options Object An options object containing at least email and password

Creates a new ClipperAccount instance ready to log in to an account.

let clipperAccount = new ClipperAccount({email: "test@example.com", password: "test");

###ClipperAccount.login(callback, forceRefresh=false)

###ClipperAccount.getProfile(callback, forceRefresh=false)

##ClipperStatement