Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jantinnerezo authored Mar 19, 2024
1 parent ad57b67 commit e709507
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,65 @@ First, you need to set the API Key
``` php
use AirLST\SdkPhp\CoreApi;

$core = new Core('API-KEY-HERE');
$core = new Core('api-key-here');
```

## Event Resource
As of now there are only 2 available methods
There are currently only 2 available methods

### List all company events
> **Important:** This method requires the API key must be company bound!
``` php
$response = $core->event()->list();

$response->json(); // Get response data as array
```

### Get event details using UUID
``` php
$response = $core->event()->get('EVENT-UUID-HERE');
// Get response data as array
$response = $core->event()->get('event-uuid-here');

$response->json(); // Get response data as array
```

## Guest Resource

### Validate guest code
``` php
$response = $core->guest('event-uuid-here')->validateCode('guest-code');

$response->json(); // Get response data as array
```

### Get guest with code
``` php
$response = $core->guest('event-uuid-here')->get('guest-code');

$response->json(); // Get response data as array
```

### Create guest
``` php
$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
``` php
$response = $core->guest('event-uuid-here')->update('guest-code', [
'status' => 'confirmed',
'contact' => [
'last_name' => 'Wick'
]
]);

$response->json(); // Get response data as array
```

0 comments on commit e709507

Please sign in to comment.