PHP code example of divineomega / github-status-api
1. Go to this page and download the library: Download divineomega/github-status-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/ */
divineomega / github-status-api example snippets
use Carbon\Carbon;
use DivineOmega\GitHubStatusApi\Client;
use DivineOmega\GitHubStatusApi\Enums\GitHubStatus;
switch ($status) {
case GitHubStatus::GOOD:
echo 'GitHub is up! No issues reported.';
break;
case GitHubStatus::MINOR:
echo 'GitHub is experiencing minor issues.';
break;
case GitHubStatus::MAJOR:
echo 'GitHub is experiencing major issues.';
break;
case GitHubStatus::UNKNOWN:
echo 'Unable to determine GitHub\'s status.';
break;
}
echo PHP_EOL;