symm / viewranger-api-client
Client for the ViewRanger API
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/symm/viewranger-api-client
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(); }