Skip to content

JET Connect API implementation for Laravel

License

Notifications You must be signed in to change notification settings

food-ticket/jet-connect-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JET Connect API implementation for Laravel

GitHub license

This package allows you to easily make requests to JustEatTakeaway's JET Connect API.

Requirements

  • PHP >= 8.1
  • Laravel >= 9.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,
);

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 [email protected].

About

JET Connect API implementation for Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages