docchula/vesta-client

Laravel Client Service for Vesta, the MDCU Directory Provider

v1.0.0 2024-04-12 14:55 UTC

This package is auto-updated.

Last update: 2024-05-12 15:08:28 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Laravel Client Service for Vesta, the MDCU Directory Provider

Installation

You can install the package via composer:

composer require docchula/vesta-client

You can publish the config file with:

php artisan vendor:publish --tag="vesta-client-config"

You should set the following ENV variables:

  • VESTA_SECRET - The secret key provided by Vesta
  • VESTA_ISSUER - The issuer URL provided by Vesta
  • VESTA_URL- The URL of the Vesta API (optional)

Usage

$vestaClient = new Docchula\VestaClient();
// or use Laravel's Facade:
$response = VestaClient::retrieveStudent($identifier, $userEmail, ['title', 'first_name', 'last_name', 'first_name_en', 'last_name_en', 'email', 'nickname']);
if ($response->successful()) {
    $data = $response->json();
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.