You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a simple way to test the connection to the LRS
Create the XApiClientBuilder
Create the xApiClient
Create the statementsApiClient
getStatements
use Xabbuh\XApi\Client\XApiClientBuilder;
use Http\Adapter\Guzzle7\Client;
use Http\Message\MessageFactory\GuzzleMessageFactory;
.
.
.
$builder = new XApiClientBuilder();
$xApiClient = $builder
->setHttpClient(new Client())
->setRequestFactory(new GuzzleMessageFactory())
->setBaseUrl($endpoint)
->setAuth($key, $secret)
->setVersion($version)
->build();
$statementsApiClient = $xApiClient->getStatementsApiClient();
$result = $statementsApiClient->getStatements();
All of this works, but what I am looking to do is a simple test to check the connection works before I get into statements/storing. Is there a method available that I am missing that can test the client before doing any statements/storing?
Activity