The OpenWeather API module is implements the OpenWeather One Call API 3.0 as a Service. By itself, this module does nothing and other modules should use it to connect and query the One Call API.
Once complete, this module will be moved to Drupal.org as a community module. Currently, there are no tests which is recommended for contrib modules.
There are no other module dependencies for this module.
You will need an API key from openweathermap.org to access the API.
The recommended method of installation is using composer. Before you can add this module to your project, you will need to first add this repository to your composer.json file under the "repositories" section. The code below demonstrates how to do this.
"repositories": [
... ,
{
"type": "vcs",
"url": "https://github.com/r0nn1ef/ow_onecall.git"
}
]
Once you have the repository added, you can add the module using composer require drupal/ow_onecall:@beta
- To enter your API key, navigate to /admin/config/services/openweather.
- When doing geocoding for cities in the United Kingdom, you MUST use 'GB' for Great Britain instead or no results will be returned.
- Make api key optionally stored in either the database or in a .evn file. 🎉
Current maintainers for Drupal 10 and 11:
- Ron Ferguson (r0nn1ef) - https://www.drupal.org/u/r0nn1ef