PHP code example of robo-meister / context-engine-api
1. Go to this page and download the library: Download robo-meister/context-engine-api 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/ */
robo-meister / context-engine-api example snippets
$ce = new ContextEngineClient(
'https://ce.example.com',
bearerToken: $serviceToken
);
use ContextEngine\ContextEngineException;
try {
$result = $ce->resolve(['document'], $scopes);
} catch (ContextEngineException $e) {
// Classify with errorCode and statusCode, e.g. 401/403, 429 or 503.
// responseHeaders can