ViewRanger API Client
, (*1)
A PHP client for the ViewRanger Beacon API, (*2)
Get the latest Beacon
``` php
require_once('vendor/autoload.php');, (*3)
use Symm\ViewRangerClient\ViewRangerClient;, (*4)
$client = ViewRangerClient::create('YOUR_API_KEY_HERE');
$lastBeacon = $client->getLastBeaconPosition('your-email@address.com', 1234);, (*5)
print $beacon->getLocation();
print $beacon->getHeading();
print $beacon->getSpeed();, (*6)
### Get Beacons between two given timestamps
``` php
$start = new \DateTime('2014-08-11');
$end = new \DateTime('2014-08-12');
$beacons = $client->getBeaconPositions('your-email@address.com', 1234, $start, $end);
foreach ($beacons as $beacon) {
print $beacon->getLocation();
print $beacon->getHeading();
print $beacon->getSpeed();
}