PHP_SMART_HOME_V3/app/api/CronApi.php
2020-10-15 18:55:16 +02:00

19 lines
451 B
PHP

<?php
class CronApi extends ApiController {
public function clean(){
$logKeeper = new LogMaintainer();
$logKeeper->purge(LOGTIMOUT);
$this->response(['Value' => 'OK']);
}
public function fetch(){
//echo (new VirtualDeviceManager)->fetch('');
echo (new Covid)->fetch('');
echo (new OpenWeatherMap)->fetch('');
echo (new UsaElection)->fetch('');
$this->response(['Value' => 'OK']);
}
}