vardump-de / craft-openweather
为 craft 3 提供openweather数据
1.0.0
2017-12-14 10:19 UTC
Requires
- craftcms/cms: ^3.0.0-RC2
- guzzlehttp/guzzle: ~6.3.0
This package is not auto-updated.
Last update: 2024-09-18 04:03:13 UTC
README
提供来自 openweathermap 的天气数据给 craft 3
要求
此插件需要 Craft CMS 3.0.0-RC2 或更高版本。
安装
要安装此插件,请按照以下说明操作。
-
打开您的终端并进入您的 Craft 项目目录
cd /path/to/project
-
然后告诉 Composer 加载此插件
composer require vardump-de/craft-openweather
-
在控制面板中,转到设置 → 插件,并为 openweather 点击“安装”按钮。
配置 openweather
在插件设置页面中插入您的 openweathermap API 密钥。
使用 openweather
{% set weather = craft.openweather.findById(12345, {'units': 'metric'}) %}
openweather 路线图
一些要完成的事情和潜在功能的想法
- 添加预报
- 可配置的缓存时间
- 添加标志
- 添加一些翻译
- 添加 JS 查询