flooris/laravel-xelion

Laravel package for connecting to Xelion

v1.1.3 2023-09-28 08:08 UTC

This package is auto-updated.

Last update: 2024-11-28 10:33:31 UTC


README

Install package using composer

composer require flooris/laravel-xelion

Example script

Get Xelion Users as a Collection

use Illuminate\Support\Facades\App;
use Flooris\XelionClient\XelionService;
use Flooris\XelionClient\Model\XelionApiCredentialsModel;
use Flooris\XelionClient\HttpClient\XelionApiConnector;
use Flooris\XelionClient\ModelPaginator\XelionUserPaginator;

$baseUrl = "https://xelion01.example.com";
$username = "some-api-user";
$password = "super-secret";
$version = "v1";
$tenant = "tenant01";
$token = null;

$credentials = new XelionApiCredentialsModel(
  $baseUrl,
  $username,
  $password,
  $version,
  $tenant,
  $token
);

/** @var XelionService $service */
$service = App::make(XelionService::class);

$userCollection =  $service->connect($credentials)
    ->userPaginator()
    ->getAll();