Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

symm/viewranger-api-client

Repository files navigation

ViewRanger API Client

Build Status

A PHP client for the ViewRanger Beacon API

Get the latest Beacon

require_once('vendor/autoload.php');

use Symm\ViewRangerClient\ViewRangerClient;

$client     = ViewRangerClient::create('YOUR_API_KEY_HERE');
$lastBeacon = $client->getLastBeaconPosition('your-email@address.com', 1234);

print $beacon->getLocation();
print $beacon->getHeading();
print $beacon->getSpeed();

Get Beacons between two given timestamps

$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();
}

About

ViewRanger API client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages