PHP code example of besmartand-pro / bsap-sensor-bundle
1. Go to this page and download the library: Download besmartand-pro/bsap-sensor-bundle 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/ */
besmartand-pro / bsap-sensor-bundle example snippets
return [
BeSmartAndPro\BsapSensorBundle\BsapSensorBundle::class => ['all' => true],
];
use BeSmartAndPro\BsapSensorClient\SensorClientInterface;
final readonly class SensorHistoryService
{
public function __construct(private SensorClientInterface $sensorClient)
{
}
public function read(string $sensorId): array
{
return $this->sensorClient->getSensorHistory($sensorId);
}
}