jwpage / gocard
There is no license information available for the latest version (v2.1.0) of this package.
A PHP API for retrieving data from the Translink GoCard website.
v2.1.0
2013-01-09 10:10 UTC
Requires
- fabpot/goutte: *
- guzzle/guzzle: ~3.0.7@stable
Requires (Dev)
- phpunit/phpunit: ~3.7.10@stable
This package is auto-updated.
Last update: 2025-02-11 19:58:09 UTC
README
A PHP5.3+ interface that scrapes the Queensland Transport GoCard website to retrieve your information.
Installation
Add this to your composer.json by running
composer.phar require jwpage/gocard
.
Usage
$goCard = new \Jwpage\GoCard($cardNumber, $password); $goCard->login(); // true $goCard->getBalance(); // 10.00 $startDate = new \DateTime('2012-10-01'); $endDate = new \DateTime('2012-12-01'); $goCard->getHistory($startDate, $endDate); // array of \Jwpage\GoCard\History items $goCard->logout(); // true
Running Tests
First, install PHPUnit with composer.phar install --dev
, then run
./vendor/bin/phpunit
.