From 79d5f4c1f95cf2378a13394e129b9778f14d0631 Mon Sep 17 00:00:00 2001 From: alphayax Date: Wed, 3 Feb 2016 20:19:02 +0100 Subject: [PATCH] Add System service --- freebox/api/v3/config/System.php | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 freebox/api/v3/config/System.php diff --git a/freebox/api/v3/config/System.php b/freebox/api/v3/config/System.php new file mode 100644 index 0000000..b1eabde --- /dev/null +++ b/freebox/api/v3/config/System.php @@ -0,0 +1,37 @@ + + */ +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(); + } + +}