Skip to content

airlst/sdk-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example workflow

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