Skip to content

Commit

Permalink
Fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jantinnerezo committed Mar 22, 2024
2 parents 448c642 + e709507 commit 17b0418
Showing 1 changed file with 75 additions and 7 deletions.
82 changes: 75 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Core API SDK for PHP
This package is currently work in progress


### Installation
First, make sure you have the following requirements installed:
- PHP (version X.X.X or higher)
## Requirements
- PHP 8.2
- Composer

Next, you need to add the package to your composer.json repositories array.

## Installation
Add the package to your composer.json repositories array.
``` json
"repositories": [
{
"type": "vcs",
"url": "https://github.com/airlst/sdk-php.git"
}
Expand All @@ -18,5 +21,70 @@ Require the package.
composer require airlst/sdk-php
```

### Todo
- Add event resource
## Usage
First, you need to set the API Key
``` php
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!
``` 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');

$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 17b0418

Please sign in to comment.