This commit is contained in:
Chris
2018-10-18 15:59:38 +01:00
parent 4f6a0cb7c6
commit 380a0e8623
352 changed files with 32929 additions and 3604 deletions

View File

@@ -0,0 +1,77 @@
<?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)]);
}
}