ignatenkovnikita/ya-weather

There is no license information available for the latest version (dev-master) of this package.

Parser Yandex Weather

dev-master 2016-03-28 16:32 UTC

This package is auto-updated.

Last update: 2024-10-29 04:14:41 UTC


README

Parser Weather from Yandex Weather

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Dependency Status Scrutinizer Code Quality codecov.io HHVM Status Code Climate

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\