baspa/buienradar-php-api
Composer 安装命令:
composer require baspa/buienradar-php-api
包简介
PHP package to provide fluent syntax for the Buienradar API
README 文档
README
This framework-agnostic PHP package provides a fluent syntax to interact with the Buienradar API.
Installation
You can install the package via composer:
composer require baspa/buienradar-php-api
Usage
Initialization
Create an instance of the Buienradar class:
use Baspa\Buienradar\Buienradar; $buienradar = new Buienradar();
Get the actual forecast report
$forecast = $buienradar->forecast()->report();
Get the short-term forecast
$forecast = $buienradar->forecast()->shortTerm();
Get the long-term forecast
$forecast = $buienradar->forecast()->longTerm();
Get the forecast for the upcoming 5 days
$forecast = $buienradar->forecast()->forFiveDays();
Get the forecast for one specific day
If you want to get the forecast for a specific day, you can use the forDay method. The parameter is the day you want to get the forecast for, where 0 is today, 1 is tomorrow, and so on. The maximum value is 4.
$forecast = $buienradar->forecast()->forDay(1);
Get the actual forecast for a specific measurement station
Choose either one of the following measuring stations:
- Meetstation Arcen
- Meetstation Arnhem
- Meetstation Berkhout
- Meetstation De Bilt
- Meetstation Den Helder
- Meetstation Eindhoven
- Meetstation Ell
- Meetstation Gilze Rijen
- Meetstation Goes
- Meetstation Groenlo-Hupsel
- Meetstation Groningen
- Meetstation Heino
- Meetstation Herwijnen
- Meetstation Hoek van Holland
- Meetstation Hoogeveen
- Meetstation Hoorn Terschelling
- Meetstation Houtribdijk
- Meetstation IJmuiden
- Meetstation Lauwersoog
- Meetstation Leeuwarden
- Meetstation Lelystad
- Meetstation Lopik-Cabauw
- Meetstation Maastricht
- Meetstation Marknesse
- Meetstation Nieuw Beerta
- Meetstation Rotterdam
- Meetstation Rotterdam Geulhaven
- Meetstation Schiphol
- Meetstation Stavoren
- Meetstation Texelhors
- Meetstation Twente
- Meetstation Vlieland
- Meetstation Vlissingen
- Meetstation Volkel
- Meetstation Voorschoten
- Meetstation Westdorpe
- Meetstation Wijdenes
- Meetstation Wijk aan Zee
- Meetstation Woensdrecht
- Meetstation Zeeplatform F-3
For example, to get the forecast for the Volkel station, use:
use Baspa\Buienradar\Enum\MeasuringStation; $forecast = $buienradar->actualForecastForStation(MeasuringStation::VOLKEL);
Rain forecast (short-term precipitation)
Fetch the short-term precipitation forecast (next ~2 hours, per 5 minutes) for a coordinate:
use Baspa\Buienradar\Buienradar; $rain = (new Buienradar)->rainForecast(52.1, 5.18); foreach ($rain as $moment) { echo $moment->time; // '14:25' echo $moment->value; // 0–255 (raw Buienradar value) echo $moment->mm; // mm per hour echo $moment->isDry(); // true when value === 0 }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
baspa/buienradar-php-api 适用场景与选型建议
baspa/buienradar-php-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 357 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 03 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Baspa」 「buienradar-php-api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 baspa/buienradar-php-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 baspa/buienradar-php-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 baspa/buienradar-php-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel package to generate arrays of available timezones to be used in lists.
y
PHP client for the dynamic prices from EnergyZero
Upload local files and folders to S3 from an Artisan command
A runtime smoke-sweep that asserts every Filament page mounts and authorizes, enforceable in CI.
Widget to show the Dutch forecast in a Filament widget
统计信息
- 总下载量: 357
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 19
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-16