Add System service
This commit is contained in:
parent
bd7fed73b5
commit
79d5f4c1f9
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\config;
|
||||
use alphayax\freebox\api\v3\Service;
|
||||
|
||||
|
||||
/**
|
||||
* Class System
|
||||
* @package alphayax\freebox\api\v3\config
|
||||
* @author <alphayax@gmail.com>
|
||||
*/
|
||||
class System extends Service {
|
||||
|
||||
const API_SYSTEM = '/api/v3/system/';
|
||||
const API_SYSTEM_REBOOT = '/api/v3/system/reboot/';
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getConfiguration(){
|
||||
$rest = $this->getAuthService( self::API_SYSTEM);
|
||||
$rest->GET();
|
||||
|
||||
return $rest->getCurlResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function reboot( ){
|
||||
$rest = $this->getAuthService( self::API_SYSTEM_REBOOT);
|
||||
$rest->POST( );
|
||||
|
||||
return $rest->getCurlResponse();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue