diff --git a/freebox/api/v3/models/SystemConfig.php b/freebox/api/v3/models/SystemConfig.php new file mode 100644 index 0000000..1deaa30 --- /dev/null +++ b/freebox/api/v3/models/SystemConfig.php @@ -0,0 +1,44 @@ +getAuthService( self::API_SYSTEM); $rest->GET(); - return $rest->getCurlResponse(); + return new SystemConfig( $rest->getCurlResponse()['result']); } /** + * Reboot the Freebox * @return array * @throws \Exception */ - public function reboot( ){ + public function reboot(){ $rest = $this->getAuthService( self::API_SYSTEM_REBOOT); - $rest->POST( ); + $rest->POST(); return $rest->getCurlResponse(); } diff --git a/freebox/api/v3/login/Authorize.php b/freebox/api/v3/services/login/Authorize.php similarity index 98% rename from freebox/api/v3/login/Authorize.php rename to freebox/api/v3/services/login/Authorize.php index 6e59e57..a4a8a2d 100644 --- a/freebox/api/v3/login/Authorize.php +++ b/freebox/api/v3/services/login/Authorize.php @@ -1,5 +1,5 @@ */ -class Login extends Service { +class Session extends Service { /// APIs services const API_LOGIN = '/api/v3/login/'; diff --git a/freebox/utils/Application.php b/freebox/utils/Application.php index 49ae521..c4f04d1 100644 --- a/freebox/utils/Application.php +++ b/freebox/utils/Application.php @@ -1,6 +1,6 @@ ask_login_status(); $Login->create_session();