1. Go to this page and download the library: Download ajur-media/ajur.weather 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/ */
ajur-media / ajur.weather example snippets
/**
* @param int $district_id
* @param null $source_file
* @return array
*/
public static function loadLocalWeather($district_id = 0, $source_file = null)
/**
* Загружает из OpenWeather погоду для переданного массива регионов
*
* @param array $regions_list - либо список регионов (многомерный массив), либо список ключей регионов (array_keys)
* @return array
* @throws OpenWeatherMap\Exception
*/
public static function fetchWeatherGroup(array $regions_list):array
/**
* @param array $regions_list
* @return array
* @throws OpenWeatherMap\Exception
*/
public static function fetchWeatherGroupDebug(array $regions_list): array