Download the PHP package noki/weather-data-provider without Composer

On this page you can find all versions of the php package noki/weather-data-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package weather-data-provider

Laravel Weather Provider Package

Latest Version on Packagist

This is simple Laravel package for providing weather information. At this moment in version 1.0.0 there are only supported two weather providers with option to provide weather data in the past. It is possible to provide weather for last 24h with display weather data per hour or weather data for last hour by minute. New features should be added in the future.

Installation

You can install the package via composer:

After composer finish installation run command:

Go to weather providers website and register account. There you will find api key that you need to add to .env file of Laravel application.

Weather provider links:

Add to .env file:

Run command:

Usage

Before usage

There are required fields that you need to set in weather configuration for providing weather data.

At this moment there are two supported weather providers:

Weather provider Provider Id
Tomorrow IO 1
AccuWeather 2

How to use?

Config setting

For providing weather it is required to add provider id in WeatherConfig and longitude and latitude of location that we require weather data.

Example of config with provider Tomorrow IO (id 1) and longitude and latitude for Berlin, Germany. For longitude and latitude you can use strings and numbers (integer and float).

Config example 2: Setting of minutely, hourly and daily weather data frequencies. Note: Some integrations do not support all of these options. Usually all integrations support hourly weather data.

Config example 3: Setting of minutely and hourly weather data frequencies and turning off daily.

Config example 4: Setting of minutely and hourly weather data frequencies and turning off daily.

Config example 5: Set providing data about temperature, pressure, wind and humidity.

Config example 6: Set imperial units for weather data output.

Config example 7: Set metric units for weather data output.

Config example 8: Set custom settings.

Required fields:

Config example 9: Set custom settings other way of setting.

Settings below will provide temperature, wind and pressure data for frequencies per minute and per hour. Units will be metric.

Examples of weather data providing

#

Changelog

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

Credits

License

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


All versions of weather-data-provider with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^11.31
symfony/console Version ^7.0
symfony/var-dumper Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package noki/weather-data-provider contains the following files

Loading the files please wait ....