2017 © Pedro Peláez
 

library forecast-php

PHP client package for the Forecast.io service

image

nwidart/forecast-php

PHP client package for the Forecast.io service

  • Monday, August 3, 2015
  • by nWidart
  • Repository
  • 1 Watchers
  • 1 Stars
  • 977 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

Forecast PHP

Latest Version Software License Build Status Coverage Status Quality Score SensioLabs Insight Total Downloads, (*1)

A PHP client package for the Forecast.io API., (*2)

Want to use this inside a Laravel application? Check out the Laravel-Forecast package., (*3)

Install

Via Composer, (*4)

``` bash $ composer require nwidart/forecast-php, (*5)


## Usage ``` php $forecast = new \Nwidart\ForecastPhp\Forecast('your_api_key'); // Simple latitude and longitude $info = $forecast->get('40.7324296', '-73.9977264'); // Fetch weather at a given time $info = $forecastPhp->get('40.7324296', '-73.9977264', '2013-05-06T12:00:00-0400'); // Add options to the request $info = $forecastPhp->setOptions(['units' => 'si',])->get('40.7324296', '-73.9977264');

For more details and all available options check the official documentation., (*6)

An example response:, (*7)

``` json { "latitude": 40.7324296, "longitude": -73.9977264, "timezone": "America/New_York", "offset": -4, "currently": { "time": 1438445386, "summary": "Partly Cloudy", "icon": "partly-cloudy-day", "nearestStormDistance": 63, "nearestStormBearing": 360, "precipIntensity": 0, "precipProbability": 0, "temperature": 84.71, "apparentTemperature": 85.39, "dewPoint": 62.25, "humidity": 0.47, "windSpeed": 7.95, "visibility": 10, "cloudCover": 0.59, "pressure": 1010.33, "ozone": 323.24 }, "minutely": { ... }, "hourly": { ... }, "daily": { ... }, "flags": { ... }, "headers": { ... } }, (*8)


## Testing ``` bash $ phpunit

Contributing

Please see CONTRIBUTING for details., (*9)

Credits

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

03/08 2015

dev-master

9999999-dev https://github.com/nWidart/forecast-php

PHP client package for the Forecast.io service

  Sources   Download

MIT

The Requires

 

The Development Requires

php weather forecast forecast.io

02/08 2015

1.0.0

1.0.0.0 https://github.com/nWidart/forecast-php

PHP client package for the Forecast.io service

  Sources   Download

MIT

The Requires

 

The Development Requires

php weather forecast forecast.io