wishthis/vendor/knplabs/github-api/lib/Github/Api/Enterprise/ManagementConsole.php
2022-01-21 09:23:52 +01:00

77 lines
2.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace Github\Api\Enterprise;
use Github\Api\AbstractApi;
class ManagementConsole extends AbstractApi
{
/**
* Checks the status of your installations most recent configuration process.
*
* @link https://developer.github.com/v3/enterprise/management_console/#check-configuration-status
*
* @param string $hash md5 hash of your license
*
* @return array array of configuration status information
*/
public function configcheck($hash)
{
return $this->getWithLicenseHash('/setup/api/configcheck', $hash);
}
/**
* Retrieves your installations settings.
*
* @link https://developer.github.com/v3/enterprise/management_console/#retrieve-settings
*
* @param string $hash md5 hash of your license
*
* @return array array of settings
*/
public function settings($hash)
{
return $this->getWithLicenseHash('/setup/api/settings', $hash);
}
/**
* Checks your installations maintenance status.
*
* @link https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status
*
* @param string $hash md5 hash of your license
*
* @return array array of maintenance status information
*/
public function maintenance($hash)
{
return $this->getWithLicenseHash('/setup/api/maintenance', $hash);
}
/**
* Retrieves your installations authorized SSH keys.
*
* @link https://developer.github.com/v3/enterprise/management_console/#retrieve-authorized-ssh-keys
*
* @param string $hash md5 hash of your license
*
* @return array array of authorized keys
*/
public function keys($hash)
{
return $this->getWithLicenseHash('/setup/api/settings/authorized-keys', $hash);
}
/**
* Sends an authenticated GET request.
*
* @param string $uri the request URI
* @param string $hash md5 hash of your license
*
* @return array|string
*/
protected function getWithLicenseHash($uri, $hash)
{
return $this->get($uri, ['license_md5' => rawurlencode($hash)]);
}
}