lii / weather
ramverk1课程使用的天气模块。
v1.2.2
2020-12-01 14:59 UTC
Requires
- php: >=7.4
Requires (Dev)
- anax/anax-ramverk1-me: ^1.0.0
- anax/cache: ^2.0@beta
- anax/commons: ^2.0.14
- phpunit/phpunit: ^7
README
为Anax构建的IP和天气模块
此存储库是为Anax框架构建的模块。
安装
此存储库作为Packagist上的软件包提供。
要安装它,您需要已经安装了Anax。在Anax根目录中运行以下命令
composer require lii/weather 安装模块。
当您仍然在Anax根目录中时,您还需要将某些文件复制到Anax
rsync -av vendor/lii/weather/config/ ./config/
rsync -av vendor/lii/weather/view/ ./view/
rsync -av vendor/lii/weather/src/ ./src/
rsync -av vendor/lii/weather/test/ ./test/
这会将所需的文件复制到Anax框架中。
完成上述操作后,您需要将模块文件的命名空间添加到Anax中。使用以下命令更新您的composer
"psr-4": {
"Anax\\": "src/",
"Lii\\": "src/"
}
在根目录中运行 dump autoloader 以加载新的命名空间。
您还需要更新位于/config下的api_keys_sample文件,以使用IP和天气服务的API密钥。
完成所有上述步骤后,您可以使用模块的路径并享受服务。以下是由此服务添加的路径。
/ip
/api
/weather
如果您之前已经有了缓存文件,您可能需要清理缓存目录。 make clean-cache