PHP code example of kevintweber / gauges
1. Go to this page and download the library: Download kevintweber/gauges library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kevintweber / gauges example snippets
use Kevintweber\Gauges\Factory;
// Create the request object.
$request = Factory::createRequest($your_gauges_api_token);
// Optionally, set a PSR-3 logger.
$request->setLogger($logger);
// Make an API call.
$response = $request->gaugeDetail($gauge_id);
// The response is a Psr7 response.
$content = (string) $response->getContent();
$data = json_decode($content, true);