PHP code example of mihaichris / air-quality

1. Go to this page and download the library: Download mihaichris/air-quality 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/ */

    

mihaichris / air-quality example snippets


$ composer 

use Air\Quality\AirQuality;

//Getting the air quality from Bucharest.
$airQuality = new AirQuality(44.43, 26.11);

//Get the air quality now.
$airQuality->getNow();

//Get the air quality in the past days.
$airQuality->getPast(2);

//Get the air quality between specific dates.
$airQuality->getBetweenDates('2023-01-01', '2023-02-01');