1. Go to this page and download the library: Download shellrent/kraken-client 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/ */
shellrent / kraken-client example snippets
$report = new \Shellrent\KrakenClient\ReportBuilder(
'report-type', //Corresponds to the type code configured on the project on kRAKEN app
'message' //Message to send
);
$client = new \Shellrent\KrakenClient\KrakenClient(
'https://kraken-endpoint.com', //kRAKEN endpoint
'auth-token' //Create an "environment" on the project page on kRAKEN app
);
$client->sendReport( $report->getData() );
try {
/* code that throws an exception */
} catch( Exception $exception ) {
$report = new \Shellrent\KrakenClient\ReportBuilder::createFromException( $exception );
/* send the report */
}