noorisysweather / weatherapi
此包最新版本(2.0.0)没有可用的许可信息。
天气API包
2.0.0
2023-03-28 07:35 UTC
Requires
- guzzlehttp/guzzle: ^7.0.1
This package is auto-updated.
Last update: 2024-09-29 07:31:26 UTC
README
安装
使用Composer在项目根目录中安装此包。
$ composer require noorisysweather/weatherapi
将服务提供者添加到config/app.php中的providers数组。
Weather\Weatherbit\Providers\WeatherServiceProvider::class,
配置
Laravel需要连接配置。要开始,你需要发布所有供应商资产
$ php artisan vendor:publish --provider="Weather\Weatherbit\Providers\WeatherServiceProvider"
你可以根据需要更改配置文件,但默认预期值如下所示在.env文件中
RAPID_API_KEY="your rapid api key" RAPID_API_HOST="api host"
在Postman上运行API
通过链接导入Postman集合并运行API
https://api.postman.com/collections/22576705-d776556b-d3c4-4cc7-92b5-6b9b29c70d21?access_key=PMAT-01GWNSPHCPC9RX678KJ5831CTG