1. Go to this page and download the library: Download mangati/cachet 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/ */
mangati / cachet example snippets
use Mangati\Cachet\Client;
$endpoint = 'https://demo.cachethq.io/api/v1/';
$token = '9yMHsdioQosnyVK4iCVR';
$client = new Client($endpoint, $token);
$incident = new Incident();
$incident->setName('My new incident');
$incident->setMessage('incident message');
$incident->setStatus(Incident::STATUS_WATCHING);
$client->addIncident($incident);
$incident = new Incident();
$incident->setId(3);
$incident->setStatus(Incident::STATUS_FIXED);
$client->updateIncident($incident);
$id = 3;
$client->deleteIncident($id);
PHP Fatal error: Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Semantical Error] The annotation "@JMS\Serializer\Annotation\Type" in property (...) does not exist, or could not be auto-loaded.'