jafo232 / ambientapi
用于环境API的包
1.04
2018-01-26 14:17 UTC
Requires
- guzzlehttp/guzzle: ^6.2@dev
This package is auto-updated.
Last update: 2024-09-08 11:19:08 UTC
README
Laravel包,用于访问环境API。目前他们的API处于测试阶段,更多信息请查看这个Facebook群组:https://#/search/top/?q=ambient%20weather%20network%20api
使用composer安装
composer require jafo232/ambientapi
在config/app.php中将以下内容添加到你的服务提供者中
jafo232\ambientapi\AmbientApiServiceProvider::class,
在别名中添加
'Ambient' => jafo232\ambientapi\AmbientApiFacade::class,
发布配置文件
php artisan vendor:publish
你可以直接编辑config/ambient.php,或者编辑你的.env文件并添加以下内容
AMBIENT_APPLICATION_KEY=YOUR_APPLICATION_KEY_HERE
AMBIENT_API_KEY=YOUR_API_KEY_HERE
确保你添加了你的真实密钥。
配置完.env文件后,你可以这样进行测试
artisan命令:test_ambient
commands文件夹中的Example.php文件展示了如何访问设备