ignatenkovnikita / ya-weather
Parser Yandex Weather
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=5.3.0
- phpunit/phpunit: 5.1.*
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
This package is auto-updated.
Last update: 2024-11-29 04:36:01 UTC
README
Parser Weather from Yandex Weather
Installation
git clone https://github.com/ignatenkovnikita/parserYandexWeather.git
cd parserYandexWeather
composer update
OR
composer require ignatenkovnikita/ya-weather
After this, run index.php from your web browser.
Demo
You can test program from this page
API
Simple usage
require_once($_SERVER['DOCUMENT_ROOT'] . '/parserYandexWeather/vendor/autoload.php'); use YaWeather\YaWeather; $cityId = 27643; // List of Town https://pogoda.yandex.ru/static/cities.xml $parser = new YaWeather($cityId); $parser->load(); // load xml $parser->show(); // get html as pogoda.yandex $parser->logFormat(); // get error & success AS string var_dump($parser->getResult()); // Get Object City with Cities
Testing
For unit testing just run command from root directory of the project:
vendor/bin/phpunit test\