Added a paper config file with airly settings, fixed some minor issues with airly data not being printed.
This commit is contained in:
1 parent
1f1743adc2
commit
8e181ec4c6
3 files changed
+30
-3
No files matched your search
@@ -146,8 +146,10 @@ class Main extends Controller
|
||||
public function airly(Request $request)
|
||||
{
|
||||
$airly = new Airly();
|
||||
$this->paper->sendImagePrint('cloud.png');
|
||||
$this->paper->sendImagePrint($airly->icon);
|
||||
$this->paper->sendHeaderPrint('Jakość powietrza:' . PHP_EOL . date('H:i d-m-Y'));
|
||||
$airly->setStations(config('paper.airly.stations'));
|
||||
|
||||
foreach ($airly->getStations() as $stationId) {
|
||||
$stationInfo = $airly->getStationInfo($stationId);
|
||||
$this->paper->sendHeaderPrint($stationInfo['address']['locality'] . ' ' . $stationInfo['address']['route']);
|
||||
|
||||
Reference in new issue
Block a user