symm / viewranger-api-client
This package is abandoned and no longer maintained.
No replacement package was suggested.
Client for the ViewRanger API
dev-master / 1.0.x-dev
2014-08-30 16:44 UTC
Requires
- php: >=5.4.0
- doctrine/collections: ~1.0
- guzzlehttp/command: ~0.4
- guzzlehttp/guzzle: 4.*
- guzzlehttp/guzzle-services: ~0.1
- whatthejeff/nyancat-phpunit-resultprinter: ~1.2
Requires (Dev)
- phpunit/phpunit: ~4.2
This package is not auto-updated.
Last update: 2023-05-09 00:34:20 UTC
README
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(); }