Skip to content

A PHP API for retrieving data from the Translink GoCard website.

License

Notifications You must be signed in to change notification settings

jwpage/gocard-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoCard PHP API

Build Status

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.

About

A PHP API for retrieving data from the Translink GoCard website.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages