This package allows you to easily make requests to JustEatTakeaway's JET Connect API.
- PHP >= 8.1
- Laravel >= 9.0
You can install the package via composer:
composer require foodticket/jet-connect
The package will automatically register itself.
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=
To set an item's availability, you can use the following code:
$jetConnectApi = new JetConnectApi();
$jetConnectApi->setItemAvailability(
Availability::UNAVAILABLE,
['itemReferences'],
$restaurantId,
$unavailableTill,
);
If you need to create your own request, you can use the following code:
$jetConnectApi = new JetConnectApi();
$jetConnectApi->request()->get('https://api.flytplatform.com/');
To start receiving webhooks from JET Connect, you need to add the following route the App\Providers\RouteServiceProvider
file:
$this->routes(function () {
// ...
Route::jetConnectWebhooks();
});
If you discover a security vulnerability within this project, please report this by email to [email protected].