cedricblondeau / presto-card-puppeteer

Get your presto card balance using Puppeteer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

presto-card-puppeteer

forthebadge forthebadge

Get your presto card balance using Puppeteer.

Usage

Get and print balance

const prestoCard = require('presto-card-puppeteer');

const username = 'YOUR_PRESTO_ACCOUNT_USERNAME';
const password = 'YOUR_PRESTO_ACCOUNT_PASSWORD';

prestoCard.getBalance(username, password)
  .then(balance => console.log(`Your balance is ${balance}`))
  .catch(e => console.log(`Error: ${e.message}`));

getBalance is an async function. When called it returns a Promise.

Dev

Install dependencies

yarn install

Debugging tips

See https://github.com/GoogleChrome/puppeteer#debugging-tips.

About

Get your presto card balance using Puppeteer.

License:MIT License


Languages

Language:JavaScript 100.0%