Download the PHP package rakibdevs/openweather-laravel-api without Composer
On this page you can find all versions of the php package rakibdevs/openweather-laravel-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rakibdevs/openweather-laravel-api
More information about rakibdevs/openweather-laravel-api
Files in rakibdevs/openweather-laravel-api
Package openweather-laravel-api
Short Description Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately
License MIT
Rated 4.00 based on 1 reviews
Informations about the package openweather-laravel-api
Laravel Open Weather API
Laravel OpenWeather API (openweather-laravel-api) is a Laravel package to connect Open Weather Map APIs ( https://openweathermap.org/api ) and access free API services (current weather, weather forecast, weather history) easily.
Supported APIs
APIs | Get data by |
---|---|
Current Weather | By city name, city ID, geographic coordinates, ZIP code |
One Call API | By geographic coordinates |
4 Day 3 Hour Forecast | By city name, city ID, geographic coordinates, ZIP code |
5 Day Historical | By geographic coordinates |
Air Pollution | By geographic coordinates |
Geocoding API | By geographic coordinates |
Installation
Install the package through Composer. On the command line:
Configuration
If Laravel > 7, no need to add provider
Add the following to your providers
array in config/app.php
:
Add API key and desired language in .env
Publish the required package configuration file using the artisan command:
Edit the config/openweather.php
file and modify the api_key
value with your Open Weather Map api key.
Now you can configure API version from config as One Call API is upgraded to version 3.0. Please set available api version in config.
Usage
Here you can see some example of just how simple this package is to use.
Current weather
Access current weather data for any location on Earth including over 200,000 cities! OpenWeather collect and process weather data from different sources such as global and local weather models, satellites, radars and vast network of weather stations
Output:
One Call API
Make just one API call and get all your essential weather data for a specific location with OpenWeather One Call API.
4 Day 3 Hour Forecast
4 day forecast is available at any location or city. It includes weather forecast data with 3-hour step.
5 Day Historical
Get access to historical weather data for the previous 5 days.
Air Pollution
Air Pollution API provides current, forecast and historical air pollution data for any coordinates on the globe
Besides basic Air Quality Index, the API returns data about polluting gases, such as Carbon monoxide (CO), Nitrogen monoxide (NO), Nitrogen dioxide (NO2), Ozone (O3), Sulphur dioxide (SO2), Ammonia (NH3), and particulates (PM2.5 and PM10).
Air pollution forecast is available for 5 days with hourly granularity. Historical data is accessible from 27th November 2020.
Geocoding API
Geocoding API is a simple tool that we have developed to ease the search for locations while working with geographic names and coordinates. -> Direct geocoding converts the specified name of a location or area into the exact geographical coordinates; -> Reverse geocoding converts the geographical coordinates into the names of the nearby locations.
Free API Limitations
- 60 calls/minute
- 1,000,000 calls/month
- 1000 calls/day when using Onecall requests
License
Laravel Open Weather API is licensed under The MIT License (MIT).