/oyster-history

:station: Grab your Oyster Card travel history

Primary LanguageJavaScript

oyster-history

Scrape your oyster card journey history

Checkout oyster-history-cli to view your oyster history in your command prompt.

Installation

$ npm install --save oyster-history

Usage

var TravelHistory = require('oyster-history');

TravelHistory('mail@example.com', 'p4ssw0rd', function(err, history) {
    console.log(history);
    //=> Returns array of travel data
    [ { date: 'Tuesday, 30 September 2014 10:33',
    balance: '£23.30',
    charge: '+£20.00',
    journey: 'Topped up,' },
  { date: 'Monday, 29 September 2014 13:33',
    balance: '£4.75',
    charge: '£1.45',
    journey: 'Entered Wimbledon tram stop' },
  { date: 'Monday, 29 September 2014 10:15',
    balance: '£6.20',
    charge: '£1.45',
    journey: 'Entered Wandle Park tram stop' } ]
});