airlst / sdk-php
There is no license information available for the latest version (0.0.2) of this package.
This package is a SDK for handling AirLST Core API calls
0.0.2
2024-05-14 14:47 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^6.0|^7.0
- saloonphp/saloon: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0|^3.14
- mockery/mockery: ^1.4
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- phpunit/phpunit: ^8.0|^9.0|^10.0
This package is auto-updated.
Last update: 2024-12-02 10:37:46 UTC
README
Core API SDK for PHP
Requirements
- PHP 8.2
- Composer
Installation
Require the package.
composer require airlst/sdk-php
Usage
First, you need to set the API Key
use AirLST\SdkPhp\CoreApi; $core = new Core('api-key-here');
Event Resource
There are currently only 2 available methods
List all company events
Important: This method requires the API key must be company bound!
$response = $core->event()->list(); $response->json(); // Get response data as array
Get event details using UUID
$response = $core->event()->get('event-uuid-here'); $response->json(); // Get response data as array
Guest Resource
Validate guest code
$response = $core->guest('event-uuid-here')->validateCode('guest-code'); $response->json(); // Get response data as array
Get guest with code
$response = $core->guest('event-uuid-here')->get('guest-code'); $response->json(); // Get response data as array
Create guest
$response = $core->guest('event-uuid-here')->create([ 'status' => 'confirmed', 'contact' => [ 'first_name' => 'John', 'last_name' => 'Doe' ] ]); $response->json(); // Get response data as array
Update existing guest with code
$response = $core->guest('event-uuid-here')->update('guest-code', [ 'status' => 'confirmed', 'contact' => [ 'last_name' => 'Wick' ] ]); $response->json(); // Get response data as array