airlst/sdk-php

There is no license information available for the latest version (0.0.1) of this package.

This package is a SDK for handling AirLST Core API calls

0.0.1 2024-03-22 15:23 UTC

This package is auto-updated.

Last update: 2024-04-22 15:44:16 UTC


README

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