Tweeks
This commit is contained in:
parent
13ae5401f7
commit
e2c9c31d2f
@ -23,7 +23,7 @@ class AirQuality extends VirtualDeviceManager
|
|||||||
$json = json_decode(Utilities::CallAPI('GET', $finalUrl, ''), true);
|
$json = json_decode(Utilities::CallAPI('GET', $finalUrl, ''), true);
|
||||||
RecordManager::create($deviceId, $this->subdevice_type, $json['data']['aqi']);
|
RecordManager::create($deviceId, $this->subdevice_type, $json['data']['aqi']);
|
||||||
} else {
|
} else {
|
||||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||||
DeviceManager::approved($this->virtual_device_name);
|
DeviceManager::approved($this->virtual_device_name);
|
||||||
}
|
}
|
||||||
return 'sucessful';
|
return 'sucessful';
|
||||||
|
@ -27,7 +27,7 @@ class Covid extends VirtualDeviceManager
|
|||||||
RecordManager::create($deviceId, strtolower($dataItem), end($json)[$dataItem]);
|
RecordManager::create($deviceId, strtolower($dataItem), end($json)[$dataItem]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||||
DeviceManager::approved($this->virtual_device_name);
|
DeviceManager::approved($this->virtual_device_name);
|
||||||
}
|
}
|
||||||
return 'sucessful';
|
return 'sucessful';
|
||||||
|
@ -24,7 +24,7 @@ class OpenWeatherMap extends VirtualDeviceManager
|
|||||||
|
|
||||||
RecordManager::create($deviceId, $this->subdevice_type, $json['weather'][0]['id']);
|
RecordManager::create($deviceId, $this->subdevice_type, $json['weather'][0]['id']);
|
||||||
} else {
|
} else {
|
||||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||||
DeviceManager::approved($this->virtual_device_name);
|
DeviceManager::approved($this->virtual_device_name);
|
||||||
}
|
}
|
||||||
return 'sucessful';
|
return 'sucessful';
|
||||||
|
@ -56,7 +56,7 @@ class Spotify extends VirtualDeviceManager
|
|||||||
// function make()
|
// function make()
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// //$this->autorize();
|
// //$this->autorize();d
|
||||||
// //$this->getPlayerData();
|
// //$this->getPlayerData();
|
||||||
// return 'sucessful';
|
// return 'sucessful';
|
||||||
// } catch (Exception $e) {
|
// } catch (Exception $e) {
|
||||||
|
@ -54,7 +54,7 @@ class UsaElection extends VirtualDeviceManager
|
|||||||
RecordManager::create($deviceId, strtolower($Category), round(($$Category / $OnePercent)));
|
RecordManager::create($deviceId, strtolower($Category), round(($$Category / $OnePercent)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||||
DeviceManager::approved($this->virtual_device_name);
|
DeviceManager::approved($this->virtual_device_name);
|
||||||
}
|
}
|
||||||
return 'sucessful';
|
return 'sucessful';
|
||||||
|
Loading…
Reference in New Issue
Block a user