PHP code example of jord-jd / github-status-api
1. Go to this page and download the library: Download jord-jd/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/ */
jord-jd / github-status-api example snippets
use Carbon\Carbon;
use JordJD\GitHubStatusApi\Client;
use JordJD\GitHubStatusApi\Enums\GitHubStatus;
17:00'));
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;