From ad57b677c70000e025793b6a86816566f38794fe Mon Sep 17 00:00:00 2001 From: Jantinn Erezo Date: Wed, 20 Mar 2024 01:38:07 +0800 Subject: [PATCH] Update README.md --- README.md | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3cd7735..46c8a6e 100644 --- a/README.md +++ b/README.md @@ -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": [ { @@ -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 +``` +