Add System service

This commit is contained in:
alphayax 2016-02-03 20:19:02 +01:00
parent bd7fed73b5
commit 79d5f4c1f9
1 changed files with 37 additions and 0 deletions

View File

@ -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();
}
}