红毛丹/天气

一个PHP的OpenWeatherMap API辅助工具。

安装: 11

依赖者: 0

建议者: 0

安全: 0

星星: 2

关注者: 4

分支: 0

开放问题: 1

类型:项目

v0.2 2015-07-14 00:16 UTC

This package is auto-updated.

Last update: 2024-09-24 04:04:48 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

OpenWeatherMap提供辅助类。

该包曾属于Dengo框架的一部分。现在它可在Tamarillo项目中找到。

###示例

<?php

// Composer Autoloader
require_once 'vendor/autoload.php';

// The Location for Stuttgart, Germany
$weather = Tamarillo\Weather\Weather::getWeather([ 48.782318, 9.17702 ];

echo $wether->weather()->id();    // The ID of the current weather

echo $wether->city();             // The name of the City
echo $wether->city()->id();       // The ID of the City
var_dump($wether->geo());         // An array of the coordinations of the City

echo $wether->weather();          // The current weather description
echo $wether->weather()->icon();  // The current weather icon