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 f1117c4 commit ad57b67
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Core API SDK for PHP
This package is currently work in progress

## Requirements
- PHP 8.2
- Composer

### Installation
First, you need to add it to your composer.json repositories array.
## Installation
Add the package to your composer.json repositories array.
``` json
"repositories": [
{
Expand All @@ -17,5 +20,29 @@ 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
As of now there are 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->json(); // Get response data as array
```

0 comments on commit ad57b67

Please sign in to comment.