Add FTP service

This commit is contained in:
alphayax 2016-02-03 20:12:37 +01:00
parent 0f7df821e3
commit bd7fed73b5
2 changed files with 38 additions and 1 deletions

View File

@ -5,7 +5,7 @@ use alphayax\freebox\api\v3\Service;
/**
* Class DHCP
* @package alphayax\freebox\api\v3
* @package alphayax\freebox\api\v3\config
* @author <alphayax@gmail.com>
*/
class DHCP extends Service {

View File

@ -0,0 +1,37 @@
<?php
namespace alphayax\freebox\api\v3\config;
use alphayax\freebox\api\v3\Service;
/**
* Class FTP
* @package alphayax\freebox\api\v3\config
* @author <alphayax@gmail.com>
*/
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();
}
}