michaelnabil230/laravel-weather

Package for get the weather data

v2.0.0 2024-06-04 18:53 UTC

This package is auto-updated.

Last update: 2024-12-02 01:44:24 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Open Meteo

Download Meteorological Data from OPEN-METEO API (https://open-meteo.com/en)

Open-Meteo collaborates with National Weather Services providing Open Data with 11 to 2 km resolution. Our high performance APIs select the best weather model for your location and provide data as a simple JSON API.

APIs are free without any API key for open-source developers and non-commercial use. You can embed them directly into your app.

Installation

You can install the package via composer:

composer require michaelnabil230/laravel-weather

You can publish the config file with:

php artisan vendor:publish --tag="laravel-weather-config"

This is the contents of the published config file:

return [
    'temperature_unit' => 'celsius',
    'wind_speed_unit' => 'kmh',
    'precipitation_unit' => 'mm',
    'time_format' => 'iso8601',
    'timezone' => 'GMT',
];

Usage

$weather = \MichaelNabil230\Weather\Weather::location(30.0812558, 31.2511902)
    ->current()
    ->get();

Functions:

15-minutely Functions:

Hourly Functions:

Daily Functions:

WMO Weather interpretation codes (WW):

Testing

composer test

Support

Image for sponsor

Or

Ko-fiBuymeacoffeePaypal

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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