2017 © Pedro Peláez
 

library openweather

Openweather API integration

image

sejurplacut/openweather

Openweather API integration

  • Sunday, February 8, 2015
  • by tudor2004
  • Repository
  • 1 Watchers
  • 0 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Openweather API

Openweather API integration for Laravel framework. Get current weather or daily forecast using multiple parameters., (*1)

Installation

Using composer:, (*2)

"require": {
    "sejurplacut/openweather": "dev-master"
}

Setup

  1. Add the following to your config/app.php file in the service providers array, (*3)

    'Sejurplacut\Openweather\Provider\OpenweatherServiceProvider'
  2. Add the following to your config/app.php file in the aliases array, (*4)

    'OpenWeather' => 'Sejurplacut\OpenWeather\Facades\Openweather'
  3. Publish configuration file:, (*5)

    php artisan config:publish sejurplacut/openweather, (*6)

Note: Change the endpoint option with caution., (*7)

Usage

Get the daily forecast., (*8)

$data = Openweather::getInstance()->getDailyForecast(array(
    'cityName'     => 'Paris',
    'latitude'     => '',
    'longitude'    => '',
    'days'         => ''
    'units'        => 'metric',
    'languageCode' => 'en',
));

Get the current weather conditions, (*9)

$data = Openweather::getInstance()->getCurrentWeather(array(
    'cityName' => 'Paris',
    'latitude' => '',
    'longitude' => '',
    'radius' => '',
    'units' => 'metric',
    'languageCode' => 'en',
));

The Versions

08/02 2015

dev-master

9999999-dev

Openweather API integration

  Sources   Download

MIT

The Requires

 

by Tudor-Dan Ravoiu