jinas / moosun
与马尔代夫气象交互的简单接口
v1.1
2020-11-05 08:47 UTC
Requires
- fabpot/goutte: ^4.0@dev
- guzzlehttp/guzzle: ^6.0|^7.0.1
Requires (Dev)
- phpunit/phpunit: ^9.0@dev
This package is auto-updated.
Last update: 2024-09-05 17:06:40 UTC
README
🔋 安装
composer require jinas/moosun
💡 这是如何工作的
Moosunmv 库是围绕马尔代夫气象 API 的包装。库帮助您与气象站交互并获得实时天气数据。以下列出了可用的站名。库还有一个 imgscraper 类,可以从马尔代夫气象网站抓取最新的卫星图像。
使用的包
Guzzle Goutte
基本用法 - 天气数据
您可以通过以下任何一个站名来获取数据
$rp = new MoosunMv('Gan'); echo $rp->stationname; echo $rp->temperature;
基本用法 - 卫星图像抓取器
$image = new ImgScraper; echo $image->satellite_image;
可用站点
- 马累
- 汉马杜胡
- 卡霍杜
- 卡代赫杜
- 甘
可用对象
- stationname
- hastide
- sunrise
- sunset
- moonrise
- moonset
- humidity
- temperature
- description
- dayicon
- nighticon
- rainamount
- wind
- sunshine-
- 明天的预测数据-
- first_date
- first_condition
- first_sea
- first_wind
- first_icon
后天预测数据
- second_date
- second_condition
- second_sea
- second_wind
- second_icon
第三天预测数据
- third_date
- third_condition
- third_sea
- third_wind
- third_icon