guhelski/forecast-php
最新稳定版本:1.1.1
Composer 安装命令:
composer require guhelski/forecast-php
包简介
Drop dead simple Dark Sky API wrapper in PHP
README 文档
README
Drop dead simple Forecast.io API v2 Dark Sky API wrapper in PHP.
This lets you get from the Dark Sky API docs to the code as directly as possible.
PSR friendly and requires nothing. Abstractions not included.
Installation
Easy breezy using Composer:
composer require guhelski/forecast-php
Usage
As simple as calling one method.
<?php use Forecast\Forecast; $forecast = new Forecast('YOUR_API_KEY'); // Get the current forecast for a given latitude and longitude var_dump($forecast->get('37.8267','-122.423')); // Get the forecast at a given time var_dump($forecast->get('37.8267','-122.423', '2013-05-06T12:00:00-0400')); // Use some optional query parameters var_dump($forecast->get( '37.8267', '-122.423', null, array( 'units' => 'si', 'exclude' => 'flags' ) ) );
For more details and all available options check the official documentation.
统计信息
- 总下载量: 142.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 42
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-08-16