foodticket/jet-connect-client
最新稳定版本:1.0.4
Composer 安装命令:
composer require foodticket/jet-connect-client
包简介
A PHP client to integrate with the JET Connect API
README 文档
README
This package allows you to easily make requests to JustEatTakeaway's JET Connect API.
Requirements
- PHP >= 8.2
- Laravel >= 11.0
Installation
You can install the package via composer:
composer require foodticket/jet-connect
The package will automatically register itself.
Configuration
To start using the JET Connect API you will need an API key. Add the API key to your project's .env file:
JET_CONNECT_API_KEY=
Making requests
itemAvailability
To set an item's availability, you can use the following code:
$jetConnectApi = new JetConnectApi(); $jetConnectApi->setItemAvailability( Availability::UNAVAILABLE, ['itemReferences'], $restaurantId, $unavailableTill, );
menu
To ingest a menu, you can use the following code:
$jetConnectApi = new JetConnectApi(); $jetConnectApi->ingestMenu( ['restaurantIds'], $menu, $callbackUrl, );
Create your own request
If you need to create your own request, you can use the following code:
$jetConnectApi = new JetConnectApi(); $jetConnectApi->request()->get('https://api.flytplatform.com/');
Webhooks
To start receiving webhooks from JET Connect, you need to add the following route the App\Providers\RouteServiceProvider file:
$this->routes(function () { // ... Route::jetConnectWebhooks(); });
Security Vulnerabilities
If you discover a security vulnerability within this project, please report this by email to developer@foodticket.nl.
统计信息
- 总下载量: 8.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-12