sandeepchowdary7 / laraeventful
基于Guzzle 6的简单且可扩展的Eventful API PHP客户端,支持Laravel
V1.1.0
2019-07-10 03:58 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- laravel/framework: 5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*
This package is auto-updated.
Last update: 2024-09-10 16:07:10 UTC
README
Eventful的PHP包装器的Laravel包装器,用于他们的REST API
基于Guzzle 6的简单且可扩展的Eventful API PHP客户端,使用Laravel Facade和ServiceProvider。目前仅支持无用户端点请求。
安装
- 在您的composer.json中将包作为依赖项添加
composer require sandeepchowdary7/laraeventful
- 发布供应商配置文件
php artisan vendor:publish --provider="Sandeepchowdary7\Laraeventful\LaraeventfulServiceProvider"
- 将您的Eventful API令牌添加到位于app/config/eventful.php中的配置文件。我建议您将此键添加到项目的.env文件中,而不是直接添加到配置文件中。您可以在用户设置页面找到您的API令牌(https://www.eventful.com)。
EVENTFUL_APP_KEY=your app key here
Laravel <= 5.4
- 将以下行添加到您的config/app.php文件中的providers数组中
Sandeepchowdary7\Laraeventful\LaraeventfulServiceProvider::class,
- 将以下行添加到您的config/app.php文件中的aliases数组中
'Eventful' => Sandeepchowdary7\Laraeventful\Facade\LaraeventfulFacade::class,
以下函数可用:
初始化Eventful请求
$event = new Eventful();
获取城市事件信息
$event = new Eventful();
$event->getCityEvents($cityName);
有关REST API的更多信息,请访问此链接:http://api.eventful.com/
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。