artes/weather
Composer 安装命令:
composer require artes/weather
包简介
Anax Weather module.
README 文档
README
Anax module for weather services and IP validation
This module has been created for the course Webbaserade ramverk och designmönster at Blekinge Tekniska Högskola, fall 2020. The module is meant to be incorporated with the Anax framework.
Usage
Step 1: Install the module using composer.
composer require artes/weather
Step 2: Integrate the module into your Anax base by copying the necessary files
# Go to the root of your Anax base repo and run these two commands
rsync -av vendor/artes/weather/config ./
rsync -av vendor/artes/weather/view ./
Run even these commands if you want to execute the unit tests of the module with make test from the root of you Anax base.
rsync -av vendor/artes/weather/src ./
rsync -av vendor/artes/weather/test ./
Step 3: Add your API-keys
The module makes use of ipstack and openweathermap to provide the user with information about a given IP-address or about a valid pair of geographical coordinates.
Create an account on both sites and save your API-keys in config/api/apikeys.php according to the instructions in the comments. If you miss this step certain classes may not work as expected.
Step 4: Protect your API-keys
Update your .gitignore with the following line in your Anax base.
/config/api
Step 5: Update your navbar
Add IP and Weather to your navbar via config/navbar/header.php and via config/navbar/responsive.php
You will need to insert the following lines of code into the items-key in the above files.
[
"text" => "IP",
"url" => "ip/init",
"title" => "IP validator",
],
[
"text" => "Väder",
"url" => "weather",
"title" => "Väder API",
],
artes/weather 适用场景与选型建议
artes/weather 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「module」 「geolocation」 「validation」 「OpenWeatherMap」 「ipstack」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 artes/weather 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 artes/weather 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 artes/weather 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Maps in minutes. Powered by the Google Maps API.
The official PHP library for apiip.net that allowing customers to automate IP address validation and geolocation lookup in websites, applications and back-office system. Visit our API docs at https://apiip.net/documentation
Supports GeoIP services (sypexgeo.net).
Adds request-parameter validation to the SLIM 3.x PHP framework
A jQuery augmented PHP library for creating and validating HTML forms
A Laravel validator for delimiter-separated list of emails.
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-03