vardump-de/craft-openweather

为 craft 3 提供openweather数据

安装: 7

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 3

分支: 1

开放问题: 0

类型:craft 插件

1.0.0 2017-12-14 10:19 UTC

This package is not auto-updated.

Last update: 2024-09-18 04:03:13 UTC


README

提供来自 openweathermap 的天气数据给 craft 3

Screenshot

要求

此插件需要 Craft CMS 3.0.0-RC2 或更高版本。

安装

要安装此插件,请按照以下说明操作。

  1. 打开您的终端并进入您的 Craft 项目目录

     cd /path/to/project
    
  2. 然后告诉 Composer 加载此插件

     composer require vardump-de/craft-openweather
    
  3. 在控制面板中,转到设置 → 插件,并为 openweather 点击“安装”按钮。

配置 openweather

在插件设置页面中插入您的 openweathermap API 密钥。

使用 openweather

{% set weather = craft.openweather.findById(12345, {'units': 'metric'}) %}

openweather 路线图

一些要完成的事情和潜在功能的想法

  • 添加预报
  • 可配置的缓存时间
  • 添加标志
  • 添加一些翻译
  • 添加 JS 查询