diff --git a/freebox/api/v3/config/DHCP.php b/freebox/api/v3/config/DHCP.php index d807f5b..7cbcce5 100644 --- a/freebox/api/v3/config/DHCP.php +++ b/freebox/api/v3/config/DHCP.php @@ -5,7 +5,7 @@ use alphayax\freebox\api\v3\Service; /** * Class DHCP - * @package alphayax\freebox\api\v3 + * @package alphayax\freebox\api\v3\config * @author */ class DHCP extends Service { diff --git a/freebox/api/v3/config/FTP.php b/freebox/api/v3/config/FTP.php new file mode 100644 index 0000000..9c8fc67 --- /dev/null +++ b/freebox/api/v3/config/FTP.php @@ -0,0 +1,37 @@ + + */ +class FTP extends Service { + + const API_FTP_CONFIG = '/api/v3/ftp/config/'; + + /** + * @throws \Exception + */ + public function get_current_configuration(){ + $rest = $this->getAuthService( self::API_FTP_CONFIG); + $rest->GET(); + + return $rest->getCurlResponse(); + } + + /** + * @param array $new_config_x + * @return array + * @throws \Exception + */ + public function set_attribute_configuration( $new_config_x = []){ + $rest = $this->getAuthService( self::API_FTP_CONFIG); + $rest->PUT( $new_config_x); + + return $rest->getCurlResponse(); + } + +}