1. Go to this page and download the library: Download phpinnacle/langcat library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phpinnacle / langcat example snippets
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Psr7\HttpFactory;
use PHPinnacle\Langcat\Client;
use PHPinnacle\Langcat\Enum\StudentType;
use PHPinnacle\Langcat\Request\Authorization\AuthenticateRequest;
use PHPinnacle\Langcat\Request\Students\ListStudentsRequest;
$factory = new HttpFactory();
$client = new Client(
'https://your-instance.langlion.com/api/v4',
new HttpClient(),
$factory,
$factory,
);
$token = $client->authorization()->authenticate(
AuthenticateRequest::make()
->clientId('client-id')
->clientSecret('client-secret'),
);
$students = $client
->withAccessToken($token->accessToken)
->students()
->all(
ListStudentsRequest::make()
->page(1)
->perPage(20)
->type(StudentType::Lead)
->archived(false),
);