├── CONTRIBUTING.md ├── exemple ├── download │ ├── dl_rss │ │ └── config │ │ │ └── one_piece.json │ ├── DlConfig.php │ ├── Download.php │ └── Bittorent.php ├── version.php ├── config │ ├── DMZ.php │ ├── IncomingPort.php │ ├── System.php │ ├── LCD.php │ ├── Freeplug.php │ ├── checkDNS.php │ ├── PortForwarding.php │ ├── UPnP.php │ ├── LAN.php │ ├── VPN.php │ ├── Connection.php │ └── WiFi.php ├── permissions.php ├── Storage │ ├── Disk.php │ └── Partition.php ├── association │ └── generateToken.php ├── FileSystem │ ├── fileUpload.php │ ├── fsListing.php │ └── fileSharingLink.php ├── remote.php ├── ParentalControl │ └── Filter.php ├── Call │ └── Call.php ├── Home │ └── Nodes.php └── AirMedia │ └── AirMedia.php ├── freebox ├── api │ ├── v6 │ │ ├── models │ │ │ └── Home │ │ │ │ ├── EndpointValue.php │ │ │ │ └── Group.php │ │ ├── symbols │ │ │ ├── Node │ │ │ │ └── Enpoint │ │ │ │ │ ├── HomeAccess.php │ │ │ │ │ ├── ValueType.php │ │ │ │ │ ├── Type.php │ │ │ │ │ └── Visibility.php │ │ │ └── Tileset │ │ │ │ ├── Type.php │ │ │ │ └── Action.php │ │ └── services │ │ │ └── Home │ │ │ ├── Nodes.php │ │ │ └── Tileset.php │ ├── v3 │ │ ├── symbols │ │ │ ├── AirMedia │ │ │ │ ├── Action.php │ │ │ │ └── MediaType.php │ │ │ ├── FileSystem │ │ │ │ ├── FileInfoType.php │ │ │ │ ├── TaskState.php │ │ │ │ ├── TaskType.php │ │ │ │ └── FileUploadStatus.php │ │ │ ├── Lan │ │ │ │ ├── LanHostL3ConnectivityAF.php │ │ │ │ ├── LanType.php │ │ │ │ ├── LanHostL2IdentType.php │ │ │ │ └── LanHostType.php │ │ │ ├── VPN │ │ │ │ ├── Server │ │ │ │ │ ├── Type.php │ │ │ │ │ └── State.php │ │ │ │ ├── OpenVPNConfig │ │ │ │ │ └── Cipher.php │ │ │ │ ├── ServerConfig │ │ │ │ │ └── Type.php │ │ │ │ ├── IpInfo │ │ │ │ │ └── Provider.php │ │ │ │ ├── PPTPConfig │ │ │ │ │ └── Mppe.php │ │ │ │ └── ClientStatus │ │ │ │ │ └── State.php │ │ │ ├── Connection │ │ │ │ ├── ConnectionStatus │ │ │ │ │ ├── Media.php │ │ │ │ │ ├── Type.php │ │ │ │ │ └── State.php │ │ │ │ ├── XdslStatus │ │ │ │ │ ├── Modulation.php │ │ │ │ │ ├── Protocol.php │ │ │ │ │ └── Status.php │ │ │ │ └── DynDnsStatus │ │ │ │ │ └── Status.php │ │ │ ├── Download │ │ │ │ ├── Task │ │ │ │ │ ├── IoPriority.php │ │ │ │ │ └── Type.php │ │ │ │ ├── Peer │ │ │ │ │ ├── Protocol.php │ │ │ │ │ ├── State.php │ │ │ │ │ └── Origin.php │ │ │ │ ├── File │ │ │ │ │ ├── Status.php │ │ │ │ │ └── Priority.php │ │ │ │ ├── Feed │ │ │ │ │ └── Status.php │ │ │ │ ├── Tracker │ │ │ │ │ └── Status.php │ │ │ │ ├── Stats │ │ │ │ │ └── NzbConfigStatus │ │ │ │ │ │ ├── Status.php │ │ │ │ │ │ └── Error.php │ │ │ │ ├── BlackListEntry │ │ │ │ │ └── Reason.php │ │ │ │ └── Config │ │ │ │ │ ├── DlThrottlingConfig │ │ │ │ │ ├── Schedule.php │ │ │ │ │ └── Mode.php │ │ │ │ │ └── DlBtConfig │ │ │ │ │ └── CryptoSupport.php │ │ │ ├── SwitchPort │ │ │ │ ├── Status │ │ │ │ │ ├── Link.php │ │ │ │ │ ├── Duplex.php │ │ │ │ │ └── Speed.php │ │ │ │ └── Config │ │ │ │ │ ├── Duplex.php │ │ │ │ │ └── Speed.php │ │ │ ├── Freeplug │ │ │ │ ├── FreeplugNetRole.php │ │ │ │ └── FreeplugEthPortStatus.php │ │ │ ├── WiFi │ │ │ │ ├── Station │ │ │ │ │ └── State.php │ │ │ │ ├── APConfig │ │ │ │ │ └── Band.php │ │ │ │ ├── MacFilter │ │ │ │ │ └── Type.php │ │ │ │ ├── GlobalConfig │ │ │ │ │ └── MacFilterState.php │ │ │ │ ├── BssStatus │ │ │ │ │ └── State.php │ │ │ │ ├── BssConfig │ │ │ │ │ └── Encryption.php │ │ │ │ └── APStatus │ │ │ │ │ └── State.php │ │ │ ├── RRD │ │ │ │ ├── Db.php │ │ │ │ └── Fields │ │ │ │ │ ├── Dsl.php │ │ │ │ │ ├── Net.php │ │ │ │ │ ├── FbxSwitch.php │ │ │ │ │ └── Temp.php │ │ │ ├── Storage │ │ │ │ ├── StorageDisk │ │ │ │ │ ├── TableType.php │ │ │ │ │ ├── Type.php │ │ │ │ │ └── State.php │ │ │ │ └── DiskPartition │ │ │ │ │ ├── FsType.php │ │ │ │ │ ├── FsckResult.php │ │ │ │ │ └── State.php │ │ │ ├── Call │ │ │ │ ├── ContactEmailType.php │ │ │ │ ├── ContactAdressType.php │ │ │ │ ├── CallEntryType.php │ │ │ │ ├── ContactUrlType.php │ │ │ │ └── ContactNumberType.php │ │ │ ├── ParentalControl │ │ │ │ ├── FilterState.php │ │ │ │ └── SchedulingMode.php │ │ │ ├── NetworkShare │ │ │ │ └── AfpConfig │ │ │ │ │ └── ServerType.php │ │ │ └── Permissions.php │ │ ├── models │ │ │ ├── UPnP │ │ │ │ ├── UpnpAvConfig.php │ │ │ │ └── UpnpIgdConfig.php │ │ │ ├── LAN │ │ │ │ ├── LanInterface.php │ │ │ │ ├── LanHostName.php │ │ │ │ └── LanHostL2Ident.php │ │ │ ├── Download │ │ │ │ ├── Stats │ │ │ │ │ ├── DhtStats.php │ │ │ │ │ └── NzbConfigStatus.php │ │ │ │ ├── Config │ │ │ │ │ ├── DlBlockListConfig.php │ │ │ │ │ ├── DlRate.php │ │ │ │ │ └── DlFeedConfig.php │ │ │ │ └── BlackListEntry.php │ │ │ ├── ParentalControl │ │ │ │ └── FilterConfig.php │ │ │ ├── NAT │ │ │ │ └── DmzConfig.php │ │ │ ├── Storage │ │ │ │ └── OperationProgress.php │ │ │ ├── AirMedia │ │ │ │ ├── AirMediaConfig.php │ │ │ │ └── AirMediaReceiver.php │ │ │ ├── Freeplug │ │ │ │ └── FreeplugNetwork.php │ │ │ ├── Connection │ │ │ │ ├── Ipv6 │ │ │ │ │ └── Delegation.php │ │ │ │ └── Xdsl │ │ │ │ │ └── XdslInfos.php │ │ │ ├── WiFi │ │ │ │ ├── AccessPoint │ │ │ │ │ ├── APHtConfig.php │ │ │ │ │ └── APCapabilities.php │ │ │ │ ├── Radar │ │ │ │ │ ├── NeighborCap.php │ │ │ │ │ └── ChannelUsage.php │ │ │ │ ├── APStation │ │ │ │ │ ├── Flags.php │ │ │ │ │ └── Stats.php │ │ │ │ ├── GlobalConfig.php │ │ │ │ ├── Planning.php │ │ │ │ └── Bss │ │ │ │ │ └── Status.php │ │ │ ├── VPN │ │ │ │ ├── Client │ │ │ │ │ └── Stats.php │ │ │ │ └── Server │ │ │ │ │ └── Config │ │ │ │ │ ├── PPTPConfig.php │ │ │ │ │ └── OpenVPNConfig.php │ │ │ ├── SwitchPort │ │ │ │ └── Config.php │ │ │ ├── LCDConfig.php │ │ │ └── FileSystem │ │ │ │ └── ShareLink.php │ │ └── services │ │ │ ├── config │ │ │ ├── VPN │ │ │ │ ├── Server │ │ │ │ │ ├── IpPool.php │ │ │ │ │ ├── Connection.php │ │ │ │ │ └── Config.php │ │ │ │ └── Client │ │ │ │ │ └── Status.php │ │ │ ├── Connection │ │ │ │ ├── Ftth.php │ │ │ │ ├── Xdsl.php │ │ │ │ └── DynDns │ │ │ │ │ ├── Ovh.php │ │ │ │ │ ├── NoIP.php │ │ │ │ │ └── DynDns.php │ │ │ ├── SwitchPort │ │ │ │ ├── Status.php │ │ │ │ ├── Stats.php │ │ │ │ └── Config.php │ │ │ ├── System.php │ │ │ ├── FTP.php │ │ │ ├── LCD.php │ │ │ ├── LAN │ │ │ │ └── LAN.php │ │ │ ├── DHCP.php │ │ │ ├── NAT │ │ │ │ └── DMZ.php │ │ │ ├── WiFi │ │ │ │ ├── Planning.php │ │ │ │ ├── Bss.php │ │ │ │ └── Config.php │ │ │ ├── UPnP │ │ │ │ └── AV.php │ │ │ └── NetworkShare │ │ │ │ ├── Afp.php │ │ │ │ └── Samba.php │ │ │ ├── download │ │ │ └── Peer.php │ │ │ └── AirMedia │ │ │ ├── Config.php │ │ │ └── AirMediaReceiver.php │ ├── v4 │ │ ├── symbols │ │ │ ├── AirMedia │ │ │ │ ├── Action.php │ │ │ │ └── MediaType.php │ │ │ ├── FileSystem │ │ │ │ ├── FileInfoType.php │ │ │ │ ├── TaskState.php │ │ │ │ ├── TaskType.php │ │ │ │ └── FileUploadStatus.php │ │ │ ├── Download │ │ │ │ ├── Task │ │ │ │ │ ├── IoPriority.php │ │ │ │ │ └── Type.php │ │ │ │ ├── Peer │ │ │ │ │ ├── Protocol.php │ │ │ │ │ ├── State.php │ │ │ │ │ └── Origin.php │ │ │ │ ├── File │ │ │ │ │ ├── Status.php │ │ │ │ │ └── Priority.php │ │ │ │ ├── Feed │ │ │ │ │ └── Status.php │ │ │ │ ├── Tracker │ │ │ │ │ └── Status.php │ │ │ │ ├── Stats │ │ │ │ │ └── NzbConfigStatus │ │ │ │ │ │ ├── Status.php │ │ │ │ │ │ └── Error.php │ │ │ │ ├── BlackListEntry │ │ │ │ │ └── Reason.php │ │ │ │ └── Config │ │ │ │ │ ├── DlThrottlingConfig │ │ │ │ │ ├── Schedule.php │ │ │ │ │ └── Mode.php │ │ │ │ │ └── DlBtConfig │ │ │ │ │ └── CryptoSupport.php │ │ │ └── Permissions.php │ │ ├── models │ │ │ ├── AirMedia │ │ │ │ ├── AirMediaConfig.php │ │ │ │ └── AirMediaReceiver.php │ │ │ └── Download │ │ │ │ ├── Config │ │ │ │ ├── DlBlockListConfig.php │ │ │ │ ├── DlRate.php │ │ │ │ └── DlFeedConfig.php │ │ │ │ ├── Stats │ │ │ │ ├── NzbConfigStatus.php │ │ │ │ └── DhtStats.php │ │ │ │ └── BlackListEntry.php │ │ └── services │ │ │ ├── download │ │ │ └── Peer.php │ │ │ └── AirMedia │ │ │ └── Config.php │ └── common │ │ └── services │ │ └── ApiVersion.php ├── Exception │ └── InvalidRequestException.php └── utils │ ├── Service.php │ └── rest │ └── RestAuth.php ├── .gitignore ├── docs ├── services_v6 │ ├── __NAMESPACE__.md │ └── Home │ │ └── __NAMESPACE__.md ├── services_v3 │ ├── RRD │ │ └── __NAMESPACE__.md │ ├── config │ │ ├── VPN │ │ │ ├── __NAMESPACE__.md │ │ │ └── Client │ │ │ │ └── __NAMESPACE__.md │ │ ├── NetworkShare │ │ │ └── __NAMESPACE__.md │ │ ├── UPnP │ │ │ └── __NAMESPACE__.md │ │ ├── SwitchPort │ │ │ └── __NAMESPACE__.md │ │ ├── LAN │ │ │ └── __NAMESPACE__.md │ │ ├── Connection │ │ │ └── DynDns │ │ │ │ └── __NAMESPACE__.md │ │ └── NAT │ │ │ └── __NAMESPACE__.md │ ├── AirMedia │ │ └── __NAMESPACE__.md │ ├── Call │ │ └── __NAMESPACE__.md │ ├── login │ │ └── __NAMESPACE__.md │ ├── Storage │ │ └── __NAMESPACE__.md │ └── ParentalControl │ │ └── __NAMESPACE__.md ├── services_common │ └── __NAMESPACE__.md ├── generate.php └── services_v4 │ ├── AirMedia │ └── __NAMESPACE__.md │ ├── login │ └── __NAMESPACE__.md │ └── __NAMESPACE__.md ├── .travis.yml ├── phpunit.xml ├── phpunit.dist.xml ├── composer.json └── TODO.md /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please open a pull request for all new feature or bug fix you may encounter 2 | -------------------------------------------------------------------------------- /exemple/download/dl_rss/config/one_piece.json: -------------------------------------------------------------------------------- 1 | { 2 | "rss": "https:\/\/www.nyaa.se\/?page=rss&user=175467", 3 | "pattern": "\/One_Piece.*HD.*mp4\/", 4 | "last_date": 1465755839 5 | } -------------------------------------------------------------------------------- /freebox/api/v6/models/Home/EndpointValue.php: -------------------------------------------------------------------------------- 1 | getApiVersion(); 11 | print_r( $version); 12 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/SwitchPort/Status/Link.php: -------------------------------------------------------------------------------- 1 | 13 | ## Fetch 14 | 15 | **Class** : alphayax\freebox\api\v3\services\RRD\Fetch 16 | 17 | ### Public methods 18 | 19 | | Method | Description | 20 | |---|---| 21 | | `getStats` | Return Freebox information & statistics | 22 | 23 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/VPN/OpenVPNConfig/Cipher.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | // DMZ 12 | $toto = new \alphayax\freebox\api\v3\services\config\NAT\DMZ( $App); 13 | $a = $toto->getConfiguration(); 14 | var_dump( $a); 15 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/VPN/ServerConfig/Type.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $hasExplorerPermission = $App->hasPermission( \alphayax\freebox\api\v3\symbols\Permissions::EXPLORER); 12 | 13 | var_dump( $hasExplorerPermission); 14 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/WiFi/Station/State.php: -------------------------------------------------------------------------------- 1 | 13 | ## ApiVersion 14 | 15 | **Class** : alphayax\freebox\api\common\services\ApiVersion 16 | 17 | ### Public methods 18 | 19 | | Method | Description | 20 | |---|---| 21 | | `getApiVersion` | Return a mapping of information about the api | 22 | 23 | -------------------------------------------------------------------------------- /exemple/Storage/Disk.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $StorageDiskService = new \alphayax\freebox\api\v3\services\Storage\Disk( $App); 12 | $Disks = $StorageDiskService->getAll(); 13 | print_r( $Disks); 14 | 15 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Freeplug/FreeplugEthPortStatus.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | // PortForwarding 12 | $toto = new \alphayax\freebox\api\v3\services\config\NAT\IncomingPort( $App); 13 | $a = $toto->getFromId('http'); 14 | var_dump( $a); 15 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/WiFi/APConfig/Band.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | freebox 5 | 6 | 7 | 8 | 9 | tests 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Call/ContactEmailType.php: -------------------------------------------------------------------------------- 1 | authorize(); 12 | $App->openSession(); 13 | 14 | echo "Generated app_token : ". $App->getAppToken() . PHP_EOL; 15 | 16 | 17 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Call/ContactAdressType.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $StoragePartitionService = new \alphayax\freebox\api\v3\services\Storage\Partition( $App); 12 | $Partitions = $StoragePartitionService->getAll(); 13 | print_r( $Partitions); 14 | 15 | -------------------------------------------------------------------------------- /phpunit.dist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | freebox 5 | 6 | 7 | 8 | 9 | tests 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/ParentalControl/FilterState.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $FileUploadService = new \alphayax\freebox\api\v4\services\FileSystem\FileUpload( $App); 12 | 13 | $AllUploads = $FileUploadService->getAll(); 14 | print_r( $AllUploads); 15 | 16 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Call/CallEntryType.php: -------------------------------------------------------------------------------- 1 | setFreeboxApiHost( 'https://xxx.freeboxos.fr:17105'); 9 | $App->setAppToken( 'xxxxxxxxxxxxxxxxxxxx'); 10 | 11 | $VersionService = new \alphayax\freebox\api\common\services\ApiVersion($App); 12 | $version = $VersionService->getApiVersion(); 13 | print_r( $version); 14 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/FileSystem/TaskState.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $System = new \alphayax\freebox\api\v3\services\config\System( $App); 12 | 13 | /** @var \alphayax\freebox\api\v3\models\SystemConfig $SystemConfig */ 14 | $SystemConfig = $System->getConfiguration(); 15 | 16 | print_r( $SystemConfig); 17 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Download/Task/Type.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $FilterService = new \alphayax\freebox\api\v3\services\ParentalControl\Filter( $App); 12 | $Config = $FilterService->getConfiguration(); 13 | print_r( $Config); 14 | 15 | $Filters = $FilterService->getAll(); 16 | print_r( $Filters); 17 | 18 | -------------------------------------------------------------------------------- /exemple/config/LCD.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | // LCD Configuration 12 | $LCDService = new \alphayax\freebox\api\v3\services\config\LCD( $App); 13 | $a = $LCDService->getConfiguration(); 14 | var_dump( $a); 15 | 16 | $a->setBrightness( 10); 17 | $b = $LCDService->setConfiguration( $a); 18 | var_dump( $b); 19 | -------------------------------------------------------------------------------- /freebox/api/v4/symbols/Download/Feed/Status.php: -------------------------------------------------------------------------------- 1 | filterSubClasses( \alphayax\freebox\utils\Service::class); 19 | $gen->generate("services_$version"); 20 | } 21 | -------------------------------------------------------------------------------- /freebox/api/v4/symbols/FileSystem/TaskType.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /// Download configuration 12 | $DownloadConfigService = new \alphayax\freebox\api\v3\services\download\Configuration( $App); 13 | $DlConfig = $DownloadConfigService->getConfiguration(); 14 | print_r( $DlConfig); 15 | 16 | $DlConfig = $DownloadConfigService->updateThrottlingMode( 'normal'); 17 | print_r( $DlConfig); 18 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Download/Tracker/Status.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | // Freeplug 12 | $FreeplugService = new \alphayax\freebox\api\v3\services\config\Freeplug( $App); 13 | $a = $FreeplugService->getNetworks(); 14 | print_r( $a); 15 | 16 | $b = $FreeplugService->getFromId( '14:0C:76:27:12:19'); 17 | print_r( $b); 18 | 19 | $c = $FreeplugService->resetFromId( '14:0C:76:27:12:19'); 20 | print_r( $c); 21 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Download/Peer/State.php: -------------------------------------------------------------------------------- 1 | label; 19 | } 20 | 21 | /** 22 | * @return string 23 | */ 24 | public function getIconUrl() 25 | { 26 | return $this->icon_url; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /freebox/api/v4/symbols/Download/Stats/NzbConfigStatus/Status.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /// DNS 12 | $toto = new \alphayax\freebox\api\v3\services\config\DHCP( $App); 13 | $DHCPConfig = $toto->getConfiguration(); 14 | echo 'gateway : ' . $DHCPConfig->getGateway() . PHP_EOL; 15 | echo 'netmask : ' . $DHCPConfig->getNetmask() . PHP_EOL; 16 | echo 'DHCP IP range : ' . $DHCPConfig->getIpRangeStart() . ' => '. $DHCPConfig->getIpRangeEnd() . PHP_EOL; 17 | -------------------------------------------------------------------------------- /freebox/api/common/services/ApiVersion.php: -------------------------------------------------------------------------------- 1 | callService('GET', static::API_VERSION); 23 | 24 | return $result->getJson(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /freebox/api/v3/models/UPnP/UpnpAvConfig.php: -------------------------------------------------------------------------------- 1 | enabled; 19 | } 20 | 21 | /** 22 | * @param boolean $enabled 23 | */ 24 | public function setEnabled( $enabled) { 25 | $this->enabled = $enabled; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Download/Peer/Origin.php: -------------------------------------------------------------------------------- 1 | enabled; 19 | } 20 | 21 | /** 22 | * @param boolean $enabled 23 | */ 24 | public function setEnabled( $enabled) { 25 | $this->enabled = $enabled; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/RRD/Fields/Dsl.php: -------------------------------------------------------------------------------- 1 | getService( self::API_VPN_IPPOOL); 20 | $rest->GET(); 21 | 22 | return $rest->getResult(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /freebox/api/v4/symbols/Download/Config/DlThrottlingConfig/Schedule.php: -------------------------------------------------------------------------------- 1 | name; 22 | } 23 | 24 | /** 25 | * @return int 26 | */ 27 | public function getHostCount() { 28 | return $this->host_count; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /freebox/api/v3/models/LAN/LanHostName.php: -------------------------------------------------------------------------------- 1 | name; 22 | } 23 | 24 | /** 25 | * @return string 26 | */ 27 | public function getSource() { 28 | return $this->source; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /freebox/api/v6/symbols/Tileset/Type.php: -------------------------------------------------------------------------------- 1 | getService( self::API_CONNECTION_FTTH); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\Connection\Ftth\Status::class); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/Connection/Xdsl.php: -------------------------------------------------------------------------------- 1 | getService( self::API_CONNECTION_XDSL); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\Connection\Xdsl\XdslInfos::class); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /exemple/config/PortForwarding.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | 12 | $toto = new \alphayax\freebox\api\v3\services\config\NAT\PortForwarding( $App); 13 | $a = new \alphayax\freebox\api\v3\models\NAT\PortForwardingConfig(); 14 | $a->setEnabled( false); 15 | $a->setComment('test'); 16 | $a->setLanPort( 4242); 17 | $a->setWanPortStart( 4242); 18 | $a->setWanPortEnd( 4242); 19 | $a->setLanIp('192.168.0.42'); 20 | $a->setIpProto( 'tcp'); 21 | $a->setSrcIp('0.0.0.0'); 22 | 23 | $b = $toto->add($a); 24 | var_dump( $b); 25 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Download/Stats/DhtStats.php: -------------------------------------------------------------------------------- 1 | enabled; 22 | } 23 | 24 | /** 25 | * @return int 26 | */ 27 | public function getNodeCount() { 28 | return $this->node_count; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/SwitchPort/Status.php: -------------------------------------------------------------------------------- 1 | getService( self::API_SWITCH_STATUS); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\SwitchPort\Status::class); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Download/Config/DlThrottlingConfig/Mode.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | // UPnP AV 12 | $UPnPAvService = new \alphayax\freebox\api\v3\services\config\UPnP\AV( $App); 13 | $UPnPAvConfig = $UPnPAvService->getConfiguration(); 14 | print_r( $UPnPAvConfig); 15 | 16 | // UPnP IGD 17 | $UPnPIgdService = new \alphayax\freebox\api\v3\services\config\UPnP\IGD( $App); 18 | $UPnPIgdConfig = $UPnPIgdService->getConfiguration(); 19 | print_r( $UPnPIgdConfig); 20 | 21 | $UPnPIgdRedirections = $UPnPIgdService->getRedirections(); 22 | print_r( $UPnPIgdRedirections); 23 | 24 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/WiFi/BssConfig/Encryption.php: -------------------------------------------------------------------------------- 1 | id; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getType() { 31 | return $this->type; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Permissions.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /// Scan files in root 12 | $FSListService = new \alphayax\freebox\api\v4\services\FileSystem\FileSystemListing( $App); 13 | $FilesInRoot = $FSListService->getFilesFromDirectory( '/'); 14 | print_r( $FilesInRoot); 15 | 16 | /// Get a file information (Will throw an exception if file does not exists) 17 | try { 18 | $VideoFile = $FSListService->getFileInformation( '/Disque dur/Téléchargements/'); 19 | print_r( $VideoFile); 20 | } catch (Exception $e){ 21 | echo $e->getMessage(); 22 | } 23 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/SwitchPort/Stats.php: -------------------------------------------------------------------------------- 1 | getService( $service); 22 | $rest->GET(); 23 | 24 | return $rest->getResult( models\SwitchPort\Stats::class); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Connection/XdslStatus/Protocol.php: -------------------------------------------------------------------------------- 1 | default_filter_mode; 23 | } 24 | 25 | /** 26 | * @param string $default_filter_mode 27 | */ 28 | public function setDefaultFilterMode($default_filter_mode) { 29 | $this->default_filter_mode = $default_filter_mode; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/RRD/Fields/FbxSwitch.php: -------------------------------------------------------------------------------- 1 | 14 | ## Afp 15 | 16 | **Class** : alphayax\freebox\api\v3\services\config\NetworkShare\Afp 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getConfiguration` | Get the current Afp configuration | 23 | | `setConfiguration` | Update the Afp configuration | 24 | 25 | 26 | ## Samba 27 | 28 | **Class** : alphayax\freebox\api\v3\services\config\NetworkShare\Samba 29 | 30 | ### Public methods 31 | 32 | | Method | Description | 33 | |---|---| 34 | | `getConfiguration` | Get the current Samba configuration | 35 | | `setConfiguration` | Update the Samba configuration | 36 | 37 | -------------------------------------------------------------------------------- /docs/services_v3/config/VPN/Client/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # Client 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\config\VPN\Client 5 | 6 | # Overview 7 | 8 | - [Config](__NAMESPACE__.md#Config) 9 | - [Status](__NAMESPACE__.md#Status) 10 | 11 | 12 | --- 13 | 14 | ## Config 15 | 16 | **Class** : alphayax\freebox\api\v3\services\config\VPN\Client\Config 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getAll` | Get VPN Client configuration list | 23 | | `getFromId` | | 24 | | `add` | | 25 | | `delete` | | 26 | | `deleteFromId` | | 27 | | `update` | | 28 | 29 | 30 | ## Status 31 | 32 | **Class** : alphayax\freebox\api\v3\services\config\VPN\Client\Status 33 | 34 | ### Public methods 35 | 36 | | Method | Description | 37 | |---|---| 38 | | `getStatus` | Get the VPN client status | 39 | | `getLogs` | Get the VPN client Logs | 40 | 41 | -------------------------------------------------------------------------------- /exemple/FileSystem/fileSharingLink.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /// Scan files in root 12 | $FileSharingLinkService = new \alphayax\freebox\api\v4\services\FileSystem\FileSharingLink( $App); 13 | $Links = $FileSharingLinkService->getAll(); 14 | var_dump( $Links); 15 | 16 | $FileSharingLink = $FileSharingLinkService->create( '/Disque dur/Photos/vivi.jpg'); 17 | var_dump( $FileSharingLink); 18 | 19 | $Links = $FileSharingLinkService->getAll(); 20 | var_dump( $Links); 21 | 22 | $b = $FileSharingLinkService->deleteFromToken( $FileSharingLink->getToken()); 23 | var_dump( $b); 24 | 25 | $Links = $FileSharingLinkService->getAll(); 26 | var_dump( $Links); 27 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Lan/LanHostType.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | $CallService = new \alphayax\freebox\api\v3\services\Call\CallEntry( $App); 12 | 13 | /// Get last 100 call entries 14 | $CallEntries = $CallService->getAll(); 15 | print_r( $CallEntries); 16 | 17 | /// Get a specific call entry 18 | $CallEntry = $CallService->getFromId( $CallEntries[0]->getId()); 19 | print_r( $CallEntry); 20 | 21 | /// Delete a specific call entry 22 | $isDeleted = $CallService->deleteFromId( $CallEntries[0]->getId()); 23 | print_r( $isDeleted); 24 | 25 | /// Update a specific call entry 26 | $CallEntries[1]->setNew( false); 27 | $CallEntry = $CallService->update( $CallEntries[1]); 28 | print_r( $CallEntry); 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /exemple/Home/Nodes.php: -------------------------------------------------------------------------------- 1 | loadAppToken(); 9 | $App->openSession(); 10 | 11 | $nodeService = new \alphayax\freebox\api\v6\services\Home\Nodes($App); 12 | $nodes = $nodeService->getAll(); 13 | 14 | $nbNodes = count($nodes); 15 | echo "Found ".$nbNodes." nodes.".PHP_EOL; 16 | if ($nbNodes > 0) { 17 | echo "First node :".PHP_EOL; 18 | var_dump(current($nodes)); 19 | } 20 | echo PHP_EOL; 21 | echo PHP_EOL; 22 | 23 | $tileService = new \alphayax\freebox\api\v6\services\Home\Tileset($App); 24 | $tiles = $tileService->getTiles(); 25 | $nbTiles = count($tiles); 26 | echo "Found ".$nbTiles." tiles.".PHP_EOL; 27 | if ($nbTiles > 0) { 28 | echo "First tile :".PHP_EOL; 29 | var_dump(current($tiles)); 30 | } 31 | -------------------------------------------------------------------------------- /freebox/api/v6/services/Home/Nodes.php: -------------------------------------------------------------------------------- 1 | callService('GET', self::NODES); 20 | return $result->getModels(Node::class); 21 | } 22 | 23 | /** 24 | * Retrieve one node. 25 | * @param int $id 26 | * @retur Node 27 | */ 28 | public function getNode($id) 29 | { 30 | $result = $this->callService('GET', self::NODES.'/'.$id); 31 | return $result->getModel(Node::class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /freebox/api/v3/services/download/Peer.php: -------------------------------------------------------------------------------- 1 | getService( $service); 24 | $rest->GET(); 25 | 26 | return $rest->getResultAsArray( models\Download\Peer::class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /docs/services_v3/AirMedia/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # AirMedia 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\AirMedia 5 | 6 | # Overview 7 | 8 | - [AirMediaReceiver](__NAMESPACE__.md#AirMediaReceiver) 9 | - [Config](__NAMESPACE__.md#Config) 10 | 11 | 12 | --- 13 | 14 | ## AirMediaReceiver 15 | 16 | **Class** : alphayax\freebox\api\v3\services\AirMedia\AirMediaReceiver 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getAll` | Get the list of AirMediaReceiver connected to the Freebox Server | 23 | | `sendRequest` | Sending a request to an AirMedia receiver | 24 | 25 | 26 | ## Config 27 | 28 | **Class** : alphayax\freebox\api\v3\services\AirMedia\Config 29 | 30 | ### Public methods 31 | 32 | | Method | Description | 33 | |---|---| 34 | | `getConfiguration` | Get the current AirMedia configuration | 35 | | `setConfiguration` | Update the AirMedia configuration | 36 | 37 | -------------------------------------------------------------------------------- /docs/services_v4/AirMedia/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # AirMedia 3 | 4 | **Namespace** : alphayax\freebox\api\v4\services\AirMedia 5 | 6 | # Overview 7 | 8 | - [AirMediaReceiver](__NAMESPACE__.md#AirMediaReceiver) 9 | - [Config](__NAMESPACE__.md#Config) 10 | 11 | 12 | --- 13 | 14 | ## AirMediaReceiver 15 | 16 | **Class** : alphayax\freebox\api\v4\services\AirMedia\AirMediaReceiver 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getAll` | Get the list of AirMediaReceiver connected to the Freebox Server | 23 | | `sendRequest` | Sending a request to an AirMedia receiver | 24 | 25 | 26 | ## Config 27 | 28 | **Class** : alphayax\freebox\api\v4\services\AirMedia\Config 29 | 30 | ### Public methods 31 | 32 | | Method | Description | 33 | |---|---| 34 | | `getConfiguration` | Get the current AirMedia configuration | 35 | | `setConfiguration` | Update the AirMedia configuration | 36 | 37 | -------------------------------------------------------------------------------- /docs/services_v3/Call/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # Call 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\Call 5 | 6 | # Overview 7 | 8 | - [Contact](./Contact/__NAMESPACE__.md) 9 | - [ContactNumber](Contact/__NAMESPACE__.md#ContactNumber) 10 | - [ContactUrl](Contact/__NAMESPACE__.md#ContactUrl) 11 | - [ContactAddress](Contact/__NAMESPACE__.md#ContactAddress) 12 | - [ContactEntry](Contact/__NAMESPACE__.md#ContactEntry) 13 | - [ContactEmail](Contact/__NAMESPACE__.md#ContactEmail) 14 | - [CallEntry](__NAMESPACE__.md#CallEntry) 15 | 16 | 17 | --- 18 | 19 | ## CallEntry 20 | 21 | **Class** : alphayax\freebox\api\v3\services\Call\CallEntry 22 | 23 | ### Public methods 24 | 25 | | Method | Description | 26 | |---|---| 27 | | `getAll` | List every calls | 28 | | `getFromId` | Access a given call entry | 29 | | `delete` | Delete a call entry | 30 | | `deleteFromId` | Delete a call entry | 31 | | `update` | Update a given call entry | 32 | 33 | -------------------------------------------------------------------------------- /docs/services_v3/config/UPnP/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # UPnP 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\config\UPnP 5 | 6 | # Overview 7 | 8 | - [IGD](__NAMESPACE__.md#IGD) 9 | - [AV](__NAMESPACE__.md#AV) 10 | 11 | 12 | --- 13 | 14 | ## IGD 15 | 16 | **Class** : alphayax\freebox\api\v3\services\config\UPnP\IGD 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getConfiguration` | Get the current UPnP AV configuration | 23 | | `setConfiguration` | Update the UPnP AV configuration | 24 | | `getRedirections` | Get the list of current redirection | 25 | | `deleteRedirectionFromId` | Delete a redirection | 26 | 27 | 28 | ## AV 29 | 30 | **Class** : alphayax\freebox\api\v3\services\config\UPnP\AV 31 | 32 | ### Public methods 33 | 34 | | Method | Description | 35 | |---|---| 36 | | `getConfiguration` | Get the current UPnP AV configuration | 37 | | `setConfiguration` | Update the UPnP AV configuration | 38 | 39 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/RRD/Fields/Temp.php: -------------------------------------------------------------------------------- 1 | enabled; 22 | } 23 | 24 | /** 25 | * @param boolean $enabled 26 | */ 27 | public function setEnabled( $enabled){ 28 | $this->enabled = $enabled; 29 | } 30 | 31 | /** 32 | * @return string 33 | */ 34 | public function getIp(){ 35 | return $this->ip; 36 | } 37 | 38 | /** 39 | * @param string $ip 40 | */ 41 | public function setIp( $ip){ 42 | $this->ip = $ip; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/FileSystem/FileUploadStatus.php: -------------------------------------------------------------------------------- 1 | done_steps; 25 | } 26 | 27 | /** 28 | * @return int 29 | */ 30 | public function getMaxSteps() { 31 | return $this->max_steps; 32 | } 33 | 34 | /** 35 | * @return int 36 | */ 37 | public function getPercent() { 38 | return $this->percent; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /exemple/download/Download.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /// List of all downloads 12 | $DownloadService = new \alphayax\freebox\api\v3\services\download\Download( $App); 13 | $Downloads = $DownloadService->getAll(); 14 | print_r( $Downloads); 15 | 16 | /// Stats 17 | $Stats = $DownloadService->getStats(); 18 | print_r( $Stats); 19 | 20 | /// Files 21 | $Files = $DownloadService->getFilesFromId( $Downloads[0]->getId()); 22 | print_r( $Files); 23 | 24 | /// Priority 25 | $Success = $DownloadService->updateFilePriority( $Downloads[0]->getId(), $Files[0]->getId(), \alphayax\freebox\api\v3\symbols\Download\File\Priority::HIGH); 26 | print_r( $Success); 27 | $Files = $DownloadService->getFilesFromId( $Downloads[0]->getId()); 28 | print_r( $Files); 29 | 30 | -------------------------------------------------------------------------------- /freebox/api/v3/models/AirMedia/AirMediaConfig.php: -------------------------------------------------------------------------------- 1 | enabled; 22 | } 23 | 24 | /** 25 | * @param boolean $enabled 26 | */ 27 | public function setEnabled( $enabled){ 28 | $this->enabled = $enabled; 29 | } 30 | 31 | /** 32 | * @param string $password 33 | */ 34 | public function setPassword( $password){ 35 | $this->password = $password; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "alphayax/freebox_api_php", 3 | "description": "API PHP pour la Freebox", 4 | "license": "MIT", 5 | "minimum-stability": "dev", 6 | "prefer-stable": true, 7 | "authors": [ 8 | { 9 | "name": "Yann Ponzoni", 10 | "email": "alphayax@gmail.com" 11 | } 12 | ], 13 | "keywords": [ 14 | "freebox", 15 | "api", 16 | "rest", 17 | "Freebox revolution", 18 | "Freebox delta", 19 | "download" 20 | ], 21 | "require": { 22 | "php": ">=5.5.0", 23 | "ext-curl": "*", 24 | "alphayax/rest": "^1.1.2", 25 | "guzzlehttp/guzzle": "~6.0", 26 | "monolog/monolog": "^1.9.1" 27 | }, 28 | "require-dev": { 29 | "alphayax/phpdoc_md": "^1.0.4", 30 | "codacy/coverage": "<2.0.0", 31 | "phpunit/phpunit": "^5.4.0", 32 | "zf1/zend-reflection": "1.12.*" 33 | }, 34 | "autoload": { 35 | "psr-4": { 36 | "alphayax\\": "./" 37 | } 38 | }, 39 | "support": { 40 | "issues": "https://github.com/alphayax/freebox_api_php/issues" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/services_v3/login/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # login 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\login 5 | 6 | # Overview 7 | 8 | - [Session](__NAMESPACE__.md#Session) 9 | - [Association](__NAMESPACE__.md#Association) 10 | 11 | 12 | --- 13 | 14 | ## Session 15 | 16 | **Class** : alphayax\freebox\api\v3\services\login\Session 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `askLoginStatus` | | 23 | | `createSession` | | 24 | | `getSessionToken` | | 25 | | `getPermissions` | | 26 | 27 | 28 | ## Association 29 | 30 | **Class** : alphayax\freebox\api\v3\services\login\Association 31 | 32 | ### Public methods 33 | 34 | | Method | Description | 35 | |---|---| 36 | | `authorize` | Check if an app token is defined, and launch the association process otherwise | 37 | | `askAuthorization` | Contact the freebox and ask for App auth | 38 | | `getAuthorizationStatus` | | 39 | | `getStatus` | | 40 | | `getAppToken` | | 41 | | `setTrackId` | | 42 | 43 | -------------------------------------------------------------------------------- /docs/services_v4/login/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # login 3 | 4 | **Namespace** : alphayax\freebox\api\v4\services\login 5 | 6 | # Overview 7 | 8 | - [Session](__NAMESPACE__.md#Session) 9 | - [Association](__NAMESPACE__.md#Association) 10 | 11 | 12 | --- 13 | 14 | ## Session 15 | 16 | **Class** : alphayax\freebox\api\v4\services\login\Session 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `askLoginStatus` | | 23 | | `createSession` | | 24 | | `getSessionToken` | | 25 | | `getPermissions` | | 26 | 27 | 28 | ## Association 29 | 30 | **Class** : alphayax\freebox\api\v4\services\login\Association 31 | 32 | ### Public methods 33 | 34 | | Method | Description | 35 | |---|---| 36 | | `authorize` | Check if an app token is defined, and launch the association process otherwise | 37 | | `askAuthorization` | Contact the freebox and ask for App auth | 38 | | `getAuthorizationStatus` | | 39 | | `getStatus` | | 40 | | `getAppToken` | | 41 | | `setTrackId` | | 42 | 43 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Download/Config/DlBlockListConfig.php: -------------------------------------------------------------------------------- 1 | sources; 23 | } 24 | 25 | /** 26 | * @param \string[] $sources 27 | */ 28 | public function setSources( $sources) { 29 | $this->sources = $sources; 30 | } 31 | 32 | /** 33 | * @param \string $source 34 | */ 35 | public function addSource( $source) { 36 | $this->sources[] = $source; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/System.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class System extends ServiceAuth { 13 | 14 | const API_SYSTEM = '/api/v3/system/'; 15 | const API_SYSTEM_REBOOT = '/api/v3/system/reboot/'; 16 | 17 | /** 18 | * Get the current system info 19 | * @return models\SystemConfig 20 | */ 21 | public function getConfiguration(){ 22 | $rest = $this->getService( self::API_SYSTEM); 23 | $rest->GET(); 24 | 25 | return $rest->getResult( models\SystemConfig::class); 26 | } 27 | 28 | /** 29 | * Reboot the Freebox 30 | * @return bool 31 | */ 32 | public function reboot(){ 33 | $rest = $this->getService( self::API_SYSTEM_REBOOT); 34 | $rest->POST(); 35 | 36 | return $rest->getSuccess(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /freebox/api/v4/models/AirMedia/AirMediaConfig.php: -------------------------------------------------------------------------------- 1 | enabled; 26 | } 27 | 28 | /** 29 | * @param boolean $enabled 30 | */ 31 | public function setEnabled($enabled) 32 | { 33 | $this->enabled = $enabled; 34 | } 35 | 36 | /** 37 | * @param string $password 38 | */ 39 | public function setPassword($password) 40 | { 41 | $this->password = $password; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Freeplug/FreeplugNetwork.php: -------------------------------------------------------------------------------- 1 | initPropertyArray( 'members', Freeplug::class); 24 | } 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function getId(){ 30 | return $this->id; 31 | } 32 | 33 | /** 34 | * @return Freeplug[] 35 | */ 36 | public function getMembers(){ 37 | return $this->members; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /freebox/api/v4/services/download/Peer.php: -------------------------------------------------------------------------------- 1 | callService('GET', $service); 29 | 30 | return $rest->getModels(models\Download\Peer::class); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Connection/Ipv6/Delegation.php: -------------------------------------------------------------------------------- 1 | prefix; 22 | } 23 | 24 | /** 25 | * @param string $prefix 26 | */ 27 | public function setPrefix( $prefix){ 28 | $this->prefix = $prefix; 29 | } 30 | 31 | /** 32 | * @return string 33 | */ 34 | public function getNextHop(){ 35 | return $this->next_hop; 36 | } 37 | 38 | /** 39 | * @param string $next_hop 40 | */ 41 | public function setNextHop( $next_hop){ 42 | $this->next_hop = $next_hop; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Storage/DiskPartition/State.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /// List of all downloads 12 | $DownloadService = new \alphayax\freebox\api\v3\services\download\Download( $App); 13 | $Downloads = $DownloadService->getAll(); 14 | print_r( $Downloads); 15 | 16 | /// Trackers 17 | $TrackerService = new \alphayax\freebox\api\v3\services\download\Tracker( $App); 18 | $Trackers = $TrackerService->getAll( $Downloads[1]->getId()); 19 | print_r( $Trackers); 20 | 21 | /// Peers 22 | $PeerService = new \alphayax\freebox\api\v3\services\download\Peer( $App); 23 | $Peers = $PeerService->getAll( $Downloads[0]->getId()); 24 | print_r( $Peers); 25 | 26 | 27 | $BLService = new \alphayax\freebox\api\v3\services\download\BlackList( $App); 28 | $BLEntries = $BLService->getAllFromDownloadTaskId( $Downloads[0]->getId()); 29 | print_r( $BLEntries); 30 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/FTP.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class FTP extends ServiceAuth { 13 | 14 | const API_FTP_CONFIG = '/api/v3/ftp/config/'; 15 | 16 | /** 17 | * Get the current FTP configuration 18 | * @return models\FtpConfig 19 | */ 20 | public function getConfiguration(){ 21 | $rest = $this->getService( self::API_FTP_CONFIG); 22 | $rest->GET(); 23 | 24 | return $rest->getResult( models\FtpConfig::class); 25 | } 26 | 27 | /** 28 | * @param models\FtpConfig $ftpConfig 29 | * @return models\FtpConfig 30 | */ 31 | public function setConfiguration( models\FtpConfig $ftpConfig){ 32 | $rest = $this->getService( self::API_FTP_CONFIG); 33 | $rest->PUT( $ftpConfig); 34 | 35 | return $rest->getResult( models\FtpConfig::class); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /freebox/api/v4/models/Download/Config/DlBlockListConfig.php: -------------------------------------------------------------------------------- 1 | sources; 26 | } 27 | 28 | /** 29 | * @param \string[] $sources 30 | */ 31 | public function setSources($sources) 32 | { 33 | $this->sources = $sources; 34 | } 35 | 36 | /** 37 | * @param \string $source 38 | */ 39 | public function addSource($source) 40 | { 41 | $this->sources[] = $source; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Download/Config/DlRate.php: -------------------------------------------------------------------------------- 1 | tx_rate; 22 | } 23 | 24 | /** 25 | * @param int $tx_rate 26 | */ 27 | public function setTxRate($tx_rate) { 28 | $this->tx_rate = $tx_rate; 29 | } 30 | 31 | /** 32 | * @return int 33 | */ 34 | public function getRxRate() { 35 | return $this->rx_rate; 36 | } 37 | 38 | /** 39 | * @param int $rx_rate 40 | */ 41 | public function setRxRate($rx_rate) { 42 | $this->rx_rate = $rx_rate; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/LCD.php: -------------------------------------------------------------------------------- 1 | getService( self::API_LCD_CONFIG); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\LCDConfig::class); 23 | } 24 | 25 | /** 26 | * Update the LCD configuration 27 | * @param models\LCDConfig $lcdConfig 28 | * @return models\LCDConfig 29 | */ 30 | public function setConfiguration( models\LCDConfig $lcdConfig){ 31 | $rest = $this->getService( self::API_LCD_CONFIG); 32 | $rest->PUT( $lcdConfig); 33 | 34 | return $rest->getResult( models\LCDConfig::class); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /docs/services_v3/config/SwitchPort/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # SwitchPort 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\config\SwitchPort 5 | 6 | # Overview 7 | 8 | - [Config](__NAMESPACE__.md#Config) 9 | - [Status](__NAMESPACE__.md#Status) 10 | - [Stats](__NAMESPACE__.md#Stats) 11 | 12 | 13 | --- 14 | 15 | ## Config 16 | 17 | **Class** : alphayax\freebox\api\v3\services\config\SwitchPort\Config 18 | 19 | ### Public methods 20 | 21 | | Method | Description | 22 | |---|---| 23 | | `getFromPortId` | Get a port configuration | 24 | | `update` | Update a port configuration | 25 | 26 | 27 | ## Status 28 | 29 | **Class** : alphayax\freebox\api\v3\services\config\SwitchPort\Status 30 | 31 | ### Public methods 32 | 33 | | Method | Description | 34 | |---|---| 35 | | `getStatus` | Get the current switch status | 36 | 37 | 38 | ## Stats 39 | 40 | **Class** : alphayax\freebox\api\v3\services\config\SwitchPort\Stats 41 | 42 | ### Public methods 43 | 44 | | Method | Description | 45 | |---|---| 46 | | `getFromPortId` | Get a port configuration | 47 | 48 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/AccessPoint/APHtConfig.php: -------------------------------------------------------------------------------- 1 | ac_enabled; 22 | } 23 | 24 | /** 25 | * @param boolean $ac_enabled 26 | */ 27 | public function setAcEnabled($ac_enabled) { 28 | $this->ac_enabled = $ac_enabled; 29 | } 30 | 31 | /** 32 | * @return boolean 33 | */ 34 | public function isHtEnabled() { 35 | return $this->ht_enabled; 36 | } 37 | 38 | /** 39 | * @param boolean $ht_enabled 40 | */ 41 | public function setHtEnabled($ht_enabled) { 42 | $this->ht_enabled = $ht_enabled; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /exemple/config/LAN.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | // Lan Config 12 | $LanConfig = new \alphayax\freebox\api\v3\services\config\LAN\LAN( $App); 13 | $a = $LanConfig->getConfiguration(); 14 | print_r( $a); 15 | 16 | // Lan Browser 17 | $LanBrowser = new \alphayax\freebox\api\v3\services\config\LAN\Browser($App); 18 | $LanInterfaces = $LanBrowser->getBrowsableInterfaces(); 19 | print_r( $LanInterfaces); 20 | 21 | /** @var \alphayax\freebox\api\v3\models\LAN\LanInterface $LanInterface1 */ 22 | $LanInterface1 = $LanInterfaces[0]; 23 | 24 | $LanHosts = $LanBrowser->getHostsFromInterface( $LanInterfaces[0]); 25 | print_r( $LanHosts); 26 | 27 | $LanHost1 = $LanBrowser->getHostFromId( $LanInterface1->getName(), $LanHosts[0]->getId()); 28 | print_r( $LanHost1); 29 | 30 | $wol_status = $LanBrowser->wakeOnLan( $LanInterface1, $LanHost1); 31 | print_r( $wol_status); 32 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Download/Stats/NzbConfigStatus.php: -------------------------------------------------------------------------------- 1 | status; 29 | } 30 | 31 | /** 32 | * @return string 33 | * @see alphayax\freebox\api\v3\symbols\Download\Stats\NzbConfigStatus\Error 34 | */ 35 | public function getError() { 36 | return $this->error; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/VPN/Client/Status.php: -------------------------------------------------------------------------------- 1 | getService( self::API_VPN_CLIENT_STATUS); 21 | $rest->GET(); 22 | 23 | return $rest->getResult( models\VPN\Client\Status::class); 24 | } 25 | 26 | /** 27 | * Get the VPN client Logs 28 | * @return models\VPN\Client\Status 29 | */ 30 | public function getLogs(){ 31 | $rest = $this->getService( self::API_VPN_CLIENT_LOGS); 32 | $rest->GET(); 33 | 34 | return $rest->getResult(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /freebox/api/v6/services/Home/Tileset.php: -------------------------------------------------------------------------------- 1 | callService('GET', self::API_PREFIX.'all'); 20 | return $response->getModels(Tile::class); 21 | } 22 | 23 | /** 24 | * Get single tile. 25 | * @param int $tileId 26 | * @return Tile 27 | * @throws \GuzzleHttp\Exception\GuzzleException 28 | * @throws \alphayax\freebox\Exception\FreeboxApiException 29 | */ 30 | public function getTile($tileId) 31 | { 32 | $response = $this->callService('GET', self::API_PREFIX.$tileId); 33 | return $response->getModel(Tile::class); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/services_v3/config/LAN/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # LAN 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\config\LAN 5 | 6 | # Overview 7 | 8 | - [Browser](__NAMESPACE__.md#Browser) 9 | - [LAN](__NAMESPACE__.md#LAN) 10 | 11 | 12 | --- 13 | 14 | ## Browser 15 | 16 | **Class** : alphayax\freebox\api\v3\services\config\LAN\Browser 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getBrowsableInterfaces` | Get all Lan interfaces | 23 | | `getHostsFromInterface` | Get the LanHosts of the specified interface | 24 | | `getHostsFromInterfaceName` | Get the LanHosts of the specified interface name | 25 | | `getHostFromId` | Get a specific LanHost | 26 | | `updateHostFromInterfaceId` | Update a LanHost | 27 | | `wakeOnLan` | Send Wake ok Lan packet to an host | 28 | 29 | 30 | ## LAN 31 | 32 | **Class** : alphayax\freebox\api\v3\services\config\LAN\LAN 33 | 34 | ### Public methods 35 | 36 | | Method | Description | 37 | |---|---| 38 | | `getConfiguration` | Get the current LAN configuration | 39 | | `setConfiguration` | Update the LAN configuration | 40 | 41 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/VPN/Server/Connection.php: -------------------------------------------------------------------------------- 1 | getService( self::API_VPN_CONNECTION); 20 | $rest->GET(); 21 | 22 | return $rest->getResultAsArray( models\VPN\Server\Connection::class); 23 | } 24 | 25 | /** 26 | * Close a given connection 27 | * @param $connectionId 28 | * @return bool 29 | */ 30 | public function closeFromId( $connectionId){ 31 | $rest = $this->getService( self::API_VPN_CONNECTION . $connectionId); 32 | $rest->DELETE(); 33 | 34 | return $rest->getSuccess(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /docs/services_v3/config/Connection/DynDns/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # DynDns 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\config\Connection\DynDns 5 | 6 | # Overview 7 | 8 | - [DynDns](__NAMESPACE__.md#DynDns) 9 | - [Ovh](__NAMESPACE__.md#Ovh) 10 | - [NoIP](__NAMESPACE__.md#NoIP) 11 | 12 | 13 | --- 14 | 15 | ## DynDns 16 | 17 | **Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns\DynDns 18 | 19 | ### Public methods 20 | 21 | | Method | Description | 22 | |---|---| 23 | | `getStatus` | | 24 | | `getConfig` | | 25 | | `setConfig` | | 26 | 27 | 28 | ## Ovh 29 | 30 | **Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns\Ovh 31 | 32 | ### Public methods 33 | 34 | | Method | Description | 35 | |---|---| 36 | | `getStatus` | | 37 | | `getConfig` | | 38 | | `setConfig` | | 39 | 40 | 41 | ## NoIP 42 | 43 | **Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns\NoIP 44 | 45 | ### Public methods 46 | 47 | | Method | Description | 48 | |---|---| 49 | | `getStatus` | | 50 | | `getConfig` | | 51 | | `setConfig` | | 52 | 53 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/LAN/LAN.php: -------------------------------------------------------------------------------- 1 | getService( self::API_LAN_CONFIG); 21 | $rest->GET(); 22 | 23 | return $rest->getResult( models\LAN\LanConfig::class); 24 | } 25 | 26 | /** 27 | * Update the LAN configuration 28 | * @param models\LAN\LanConfig $lanConfig 29 | * @return models\LAN\LanConfig 30 | */ 31 | public function setConfiguration( models\LAN\LanConfig $lanConfig){ 32 | $rest = $this->getService( self::API_LAN_CONFIG); 33 | $rest->PUT( $lanConfig); 34 | 35 | return $rest->getResult( models\LAN\LanConfig::class); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | - ~~Downloads~~ 2 | - ~~Download~~ 3 | - ~~Download Stats~~ 4 | - ~~Download Files~~ 5 | - ~~Download Trackers [UNSTABLE]~~ 6 | - ~~Download Peers [UNSTABLE]~~ 7 | - ~~Download Blacklist [UNSTABLE]~~ 8 | - ~~Download Feeds~~ 9 | - ~~Download Configuration~~ 10 | - ~~File System Api~~ 11 | - ~~File System~~ 12 | - ~~File Sharing Link~~ 13 | - ~~File Upload~~ 14 | - ~~Air Media~~ 15 | - ~~AirMedia API~~ 16 | - ~~RRD~~ 17 | - ~~RRD [UNSTABLE]~~ 18 | - ~~Calls / Contacts~~ 19 | - ~~Call~~ 20 | - ~~Contacts~~ 21 | - ~~Configuration~~ 22 | - ~~Connection API~~ 23 | - ~~Lan~~ 24 | - ~~Lan Browser~~ 25 | - ~~Freeplug~~ 26 | - ~~DHCP~~ 27 | - ~~Ftp~~ 28 | - ~~NAT~~ 29 | - ~~Port Forwarding~~ 30 | - ~~Incoming port configuration~~ 31 | - ~~UPnP IGD~~ 32 | - ~~LCD~~ 33 | - ~~Network Share~~ 34 | - ~~UPnP AV~~ 35 | - ~~Switch~~ 36 | - ~~Wi-Fi~~ 37 | - ~~System~~ 38 | - ~~VPN Server [UNSTABLE]~~ 39 | - ~~VPN Client [UNSTABLE]~~ 40 | - ~~Storage~~ 41 | - ~~Storage API [UNSTABLE]~~ 42 | - ~~Parental filter~~ 43 | - ~~Parental Control~~ -------------------------------------------------------------------------------- /docs/services_v3/Storage/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # Storage 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\Storage 5 | 6 | # Overview 7 | 8 | - [Partition](__NAMESPACE__.md#Partition) 9 | - [Disk](__NAMESPACE__.md#Disk) 10 | 11 | 12 | --- 13 | 14 | ## Partition 15 | 16 | **Class** : alphayax\freebox\api\v3\services\Storage\Partition 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getAll` | Get the list of partitions | 23 | | `getFromId` | Get a given partition info | 24 | | `check` | Checks the partition with the given id *NOTE* once started you can monitor the fsck process getting the partition information | 25 | 26 | 27 | ## Disk 28 | 29 | **Class** : alphayax\freebox\api\v3\services\Storage\Disk 30 | 31 | ### Public methods 32 | 33 | | Method | Description | 34 | |---|---| 35 | | `getAll` | Get the list of disks | 36 | | `getFromId` | Get a given disk info | 37 | | `update` | Update a disk state | 38 | | `format` | Format the disk with the given id There will be one partition using all the available space on disk. All previous data will be lost. | 39 | 40 | -------------------------------------------------------------------------------- /docs/services_v6/Home/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # Home 3 | 4 | **Namespace** : alphayax\freebox\api\v6\services\Home 5 | 6 | # Overview 7 | 8 | - [Tileset](__NAMESPACE__.md#Tileset) 9 | - [EndpointValues](__NAMESPACE__.md#EndpointValues) 10 | - [Nodes](__NAMESPACE__.md#Nodes) 11 | 12 | 13 | --- 14 | 15 | ## Tileset 16 | 17 | **Class** : alphayax\freebox\api\v6\services\Home\Tileset 18 | 19 | ### Public methods 20 | 21 | | Method | Description | 22 | |---|---| 23 | | `getTiles` | Retrieve all tiles. | 24 | | `getTile` | Get single tile. | 25 | 26 | 27 | ## EndpointValues 28 | 29 | **Class** : alphayax\freebox\api\v6\services\Home\EndpointValues 30 | 31 | ### Public methods 32 | 33 | | Method | Description | 34 | |---|---| 35 | | `getEndpointValue` | Get endpoint value. | 36 | | `setEndpointValue` | Set endpoint value. | 37 | 38 | 39 | ## Nodes 40 | 41 | **Class** : alphayax\freebox\api\v6\services\Home\Nodes 42 | 43 | ### Public methods 44 | 45 | | Method | Description | 46 | |---|---| 47 | | `getAll` | Retrieve all nodes. | 48 | | `getNode` | Retrieve one node. | 49 | 50 | -------------------------------------------------------------------------------- /freebox/api/v4/models/Download/Config/DlRate.php: -------------------------------------------------------------------------------- 1 | tx_rate; 25 | } 26 | 27 | /** 28 | * @param int $tx_rate 29 | */ 30 | public function setTxRate($tx_rate) 31 | { 32 | $this->tx_rate = $tx_rate; 33 | } 34 | 35 | /** 36 | * @return int 37 | */ 38 | public function getRxRate() 39 | { 40 | return $this->rx_rate; 41 | } 42 | 43 | /** 44 | * @param int $rx_rate 45 | */ 46 | public function setRxRate($rx_rate) 47 | { 48 | $this->rx_rate = $rx_rate; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/DHCP.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class DHCP extends ServiceAuth { 13 | 14 | const API_DHCP_CONFIG = '/api/v3/dhcp/config/'; 15 | 16 | /** 17 | * Get the current DHCP configuration 18 | * @return models\DhcpConfig 19 | */ 20 | public function getConfiguration(){ 21 | $rest = $this->getService( self::API_DHCP_CONFIG); 22 | $rest->GET(); 23 | 24 | return $rest->getResult( models\DhcpConfig::class); 25 | } 26 | 27 | /** 28 | * Update the DHCP configuration 29 | * @param models\DhcpConfig $dhcpConfig 30 | * @return models\DhcpConfig 31 | */ 32 | public function setConfiguration( models\DhcpConfig $dhcpConfig){ 33 | $rest = $this->getService( self::API_DHCP_CONFIG); 34 | $rest->PUT( $dhcpConfig); 35 | 36 | return $rest->getResult( models\DhcpConfig::class); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /freebox/api/v4/models/Download/Stats/NzbConfigStatus.php: -------------------------------------------------------------------------------- 1 | status; 32 | } 33 | 34 | /** 35 | * @return string 36 | * @see \alphayax\freebox\api\v4\symbols\Download\Stats\NzbConfigStatus\Error 37 | */ 38 | public function getError() 39 | { 40 | return $this->error; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/Radar/NeighborCap.php: -------------------------------------------------------------------------------- 1 | legacy; 26 | } 27 | 28 | /** 29 | * neighbor supports ht (802.11n) 30 | * @return boolean 31 | */ 32 | public function isHt() { 33 | return $this->ht; 34 | } 35 | 36 | /** 37 | * neighbor supports vht (802.11ac) 38 | * @return boolean 39 | */ 40 | public function isVht() { 41 | return $this->vht; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Download/Config/DlFeedConfig.php: -------------------------------------------------------------------------------- 1 | fetch_interval; 22 | } 23 | 24 | /** 25 | * @param int $fetch_interval 26 | */ 27 | public function setFetchInterval( $fetch_interval) { 28 | $this->fetch_interval = $fetch_interval; 29 | } 30 | 31 | /** 32 | * @return int 33 | */ 34 | public function getMaxItems() { 35 | return $this->max_items; 36 | } 37 | 38 | /** 39 | * @param int $max_items 40 | */ 41 | public function setMaxItems( $max_items) { 42 | $this->max_items = $max_items; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/NAT/DMZ.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class DMZ extends ServiceAuth { 13 | 14 | const API_NAT_DMZ = '/api/v3/fw/dmz/'; 15 | 16 | /** 17 | * Get the current Dmz configuration 18 | * @return models\NAT\DmzConfig 19 | */ 20 | public function getConfiguration(){ 21 | $rest = $this->getService( self::API_NAT_DMZ); 22 | $rest->GET(); 23 | 24 | return $rest->getResult( models\NAT\DmzConfig::class); 25 | } 26 | 27 | /** 28 | * Update the current Dmz configuration 29 | * @param models\NAT\DmzConfig $dmzConfig 30 | * @return models\NAT\DmzConfig 31 | */ 32 | public function setConfiguration( models\NAT\DmzConfig $dmzConfig){ 33 | $rest = $this->getService( self::API_NAT_DMZ); 34 | $rest->PUT( $dmzConfig); 35 | 36 | return $rest->getResult( models\NAT\DmzConfig::class); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/WiFi/Planning.php: -------------------------------------------------------------------------------- 1 | getService( self::API_WIFI_PLANNING); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\WiFi\Planning::class); 23 | } 24 | 25 | /** 26 | * Update the wifi planning 27 | * @param \alphayax\freebox\api\v3\models\WiFi\Planning $planning 28 | * @return \alphayax\freebox\api\v3\models\WiFi\Planning 29 | */ 30 | public function update( models\WiFi\Planning $planning){ 31 | $rest = $this->getService( self::API_WIFI_PLANNING); 32 | $rest->PUT( $planning); 33 | 34 | return $rest->getResult( models\WiFi\Planning::class); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /exemple/AirMedia/AirMedia.php: -------------------------------------------------------------------------------- 1 | authorize(); 12 | $App->openSession(); 13 | 14 | 15 | // AirMedia Config 16 | $AirMediaService = new services\AirMedia\Config( $App); 17 | $Configuration = $AirMediaService->getConfiguration(); 18 | print_r( $Configuration); 19 | 20 | // AirMedia Receivers 21 | $AirMediaService = new services\AirMedia\AirMediaReceiver( $App); 22 | $Receivers = $AirMediaService->getAll(); 23 | print_r( $Receivers); 24 | 25 | // AirMedia Request 26 | $Request = new models\AirMedia\AirMediaReceiverRequest(); 27 | $Request->setAction( symbols\AirMedia\Action::START); 28 | $Request->setMediaType( symbols\AirMedia\MediaType::VIDEO); 29 | $Request->setMedia( 'http://anon.nasa-global.edgesuite.net/HD_downloads/GRAIL_launch_480.mov'); 30 | 31 | $Status = $AirMediaService->sendRequest( 'Freebox Player', $Request); 32 | print_r( $Status); 33 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/UPnP/AV.php: -------------------------------------------------------------------------------- 1 | getService( self::API_UPNP_AV_CONFIG); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\UPnP\UpnpAvConfig::class); 23 | } 24 | 25 | /** 26 | * Update the UPnP AV configuration 27 | * @param models\UPnP\UpnpAvConfig $upnpAvConfig 28 | * @return models\UPnP\UpnpAvConfig 29 | * @throws \Exception 30 | */ 31 | public function setConfiguration( models\UPnP\UpnpAvConfig $upnpAvConfig){ 32 | $rest = $this->getService( self::API_UPNP_AV_CONFIG); 33 | $rest->PUT( $upnpAvConfig); 34 | 35 | return $rest->getResult( models\UPnP\UpnpAvConfig::class); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /freebox/api/v4/models/Download/Config/DlFeedConfig.php: -------------------------------------------------------------------------------- 1 | fetch_interval; 25 | } 26 | 27 | /** 28 | * @param int $fetch_interval 29 | */ 30 | public function setFetchInterval($fetch_interval) 31 | { 32 | $this->fetch_interval = $fetch_interval; 33 | } 34 | 35 | /** 36 | * @return int 37 | */ 38 | public function getMaxItems() 39 | { 40 | return $this->max_items; 41 | } 42 | 43 | /** 44 | * @param int $max_items 45 | */ 46 | public function setMaxItems($max_items) 47 | { 48 | $this->max_items = $max_items; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/Connection/DynDns/Ovh.php: -------------------------------------------------------------------------------- 1 | getStatusFromProvider( self::PROVIDER_OVH); 20 | } 21 | 22 | /** 23 | * @inheritdoc 24 | * @return models\Connection\DynDns\Config 25 | */ 26 | public function getConfig(){ 27 | return $this->getConfigFromProvider( self::PROVIDER_OVH); 28 | } 29 | 30 | /** 31 | * @inheritdoc 32 | * @param models\Connection\DynDns\Config $config 33 | * @return models\Connection\DynDns\Config 34 | */ 35 | public function setConfig( models\Connection\DynDns\Config $config){ 36 | return $this->setConfigFromProvider( self::PROVIDER_OVH, $config); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /freebox/api/v3/services/config/Connection/DynDns/NoIP.php: -------------------------------------------------------------------------------- 1 | getStatusFromProvider( self::PROVIDER_NOIP); 20 | } 21 | 22 | /** 23 | * @inheritdoc 24 | * @return models\Connection\DynDns\Config 25 | */ 26 | public function getConfig(){ 27 | return $this->getConfigFromProvider( self::PROVIDER_NOIP); 28 | } 29 | 30 | /** 31 | * @inheritdoc 32 | * @param models\Connection\DynDns\Config $config 33 | * @return models\Connection\DynDns\Config 34 | */ 35 | public function setConfig( models\Connection\DynDns\Config $config){ 36 | return $this->setConfigFromProvider( self::PROVIDER_NOIP, $config); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /freebox/api/v3/models/VPN/Client/Stats.php: -------------------------------------------------------------------------------- 1 | rate_up; 28 | } 29 | 30 | /** 31 | * @return int 32 | */ 33 | public function getRateDown() { 34 | return $this->rate_down; 35 | } 36 | 37 | /** 38 | * @return int 39 | */ 40 | public function getBytesUp() { 41 | return $this->bytes_up; 42 | } 43 | 44 | /** 45 | * @return int 46 | */ 47 | public function getBytesDown() { 48 | return $this->bytes_down; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/Connection/DynDns/DynDns.php: -------------------------------------------------------------------------------- 1 | getStatusFromProvider( self::PROVIDER_DYNDNS); 20 | } 21 | 22 | /** 23 | * @inheritdoc 24 | * @return models\Connection\DynDns\Config 25 | */ 26 | public function getConfig(){ 27 | return $this->getConfigFromProvider( self::PROVIDER_DYNDNS); 28 | } 29 | 30 | /** 31 | * @inheritdoc 32 | * @param models\Connection\DynDns\Config $config 33 | * @return models\Connection\DynDns\Config 34 | */ 35 | public function setConfig( models\Connection\DynDns\Config $config){ 36 | return $this->setConfigFromProvider( self::PROVIDER_DYNDNS, $config); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /docs/services_v4/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # services 3 | 4 | **Namespace** : alphayax\freebox\api\v4\services 5 | 6 | # Overview 7 | 8 | - [AirMedia](./AirMedia/__NAMESPACE__.md) 9 | - [AirMediaReceiver](AirMedia/__NAMESPACE__.md#AirMediaReceiver) 10 | - [Config](AirMedia/__NAMESPACE__.md#Config) 11 | - [login](./login/__NAMESPACE__.md) 12 | - [Session](login/__NAMESPACE__.md#Session) 13 | - [Association](login/__NAMESPACE__.md#Association) 14 | - [download](./download/__NAMESPACE__.md) 15 | - [BlackList](download/__NAMESPACE__.md#BlackList) 16 | - [Tracker](download/__NAMESPACE__.md#Tracker) 17 | - [Peer](download/__NAMESPACE__.md#Peer) 18 | - [Download](download/__NAMESPACE__.md#Download) 19 | - [Feed](download/__NAMESPACE__.md#Feed) 20 | - [Configuration](download/__NAMESPACE__.md#Configuration) 21 | - [FileSystem](./FileSystem/__NAMESPACE__.md) 22 | - [FileSystemOperation](FileSystem/__NAMESPACE__.md#FileSystemOperation) 23 | - [FileSystemListing](FileSystem/__NAMESPACE__.md#FileSystemListing) 24 | - [FileUpload](FileSystem/__NAMESPACE__.md#FileUpload) 25 | - [FileSystemTask](FileSystem/__NAMESPACE__.md#FileSystemTask) 26 | - [FileSharingLink](FileSystem/__NAMESPACE__.md#FileSharingLink) 27 | 28 | 29 | --- 30 | -------------------------------------------------------------------------------- /freebox/api/v3/services/AirMedia/Config.php: -------------------------------------------------------------------------------- 1 | getService( self::API_AIRMEDIA_CONFIG); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\AirMedia\AirMediaConfig::class); 23 | } 24 | 25 | /** 26 | * Update the AirMedia configuration 27 | * @param models\AirMedia\AirMediaConfig $new_AirMediaConfig 28 | * @return models\AirMedia\AirMediaConfig 29 | */ 30 | public function setConfiguration( models\AirMedia\AirMediaConfig $new_AirMediaConfig){ 31 | $rest = $this->getService( self::API_AIRMEDIA_CONFIG); 32 | $rest->PUT( $new_AirMediaConfig); 33 | 34 | return $rest->getResult( models\AirMedia\AirMediaConfig::class); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /freebox/Exception/InvalidRequestException.php: -------------------------------------------------------------------------------- 1 | http_request_header; 18 | } 19 | 20 | /** 21 | * @param mixed $http_method 22 | */ 23 | public function setHttpRequestHeader( $http_method) { 24 | $this->http_request_header = $http_method; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getHttpUrl() { 31 | return $this->http_url; 32 | } 33 | 34 | /** 35 | * @param mixed $http_url 36 | */ 37 | public function setHttpUrl( $http_url) { 38 | $this->http_url = $http_url; 39 | } 40 | 41 | /** 42 | * @return mixed 43 | */ 44 | public function getHttpParams() { 45 | return $this->http_params; 46 | } 47 | 48 | /** 49 | * @param mixed $http_params 50 | */ 51 | public function setHttpParams( $http_params) { 52 | $this->http_params = $http_params; 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/APStation/Flags.php: -------------------------------------------------------------------------------- 1 | legacy; 28 | } 29 | 30 | /** 31 | * @return boolean 32 | */ 33 | public function isHt() { 34 | return $this->ht; 35 | } 36 | 37 | /** 38 | * @return boolean 39 | */ 40 | public function isVht() { 41 | return $this->vht; 42 | } 43 | 44 | /** 45 | * @return boolean 46 | */ 47 | public function isAuthorized() { 48 | return $this->authorized; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /docs/services_v3/ParentalControl/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # ParentalControl 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\ParentalControl 5 | 6 | # Overview 7 | 8 | - [FilterPlanning](__NAMESPACE__.md#FilterPlanning) 9 | - [Filter](__NAMESPACE__.md#Filter) 10 | 11 | 12 | --- 13 | 14 | ## FilterPlanning 15 | 16 | **Class** : alphayax\freebox\api\v3\services\ParentalControl\FilterPlanning 17 | 18 | ### Public methods 19 | 20 | | Method | Description | 21 | |---|---| 22 | | `getFromFilterId` | Get the filer planning associated with the given filter id | 23 | | `setFromFilterId` | Update the filer planning associated with the given filter id | 24 | 25 | 26 | ## Filter 27 | 28 | **Class** : alphayax\freebox\api\v3\services\ParentalControl\Filter 29 | 30 | ### Public methods 31 | 32 | | Method | Description | 33 | |---|---| 34 | | `getConfiguration` | Return the current Filter configuration | 35 | | `setConfiguration` | Update the filter configuration | 36 | | `getAll` | Get the list of all filters | 37 | | `getFromId` | Get a specific filter from id | 38 | | `update` | Update a filter | 39 | | `delete` | Delete a filter | 40 | | `deleteFromId` | Delete a filter with the specified id | 41 | | `add` | Add a new filter | 42 | 43 | -------------------------------------------------------------------------------- /freebox/api/v3/models/AirMedia/AirMediaReceiver.php: -------------------------------------------------------------------------------- 1 | name; 31 | } 32 | 33 | /** 34 | * @return boolean 35 | */ 36 | public function isPasswordProtected(){ 37 | return $this->password_protected; 38 | } 39 | 40 | /** 41 | * @return array 42 | */ 43 | public function getCapabilities(){ 44 | return $this->capabilities; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/Connection/DynDnsStatus/Status.php: -------------------------------------------------------------------------------- 1 | false, 21 | 'chap' => false, 22 | 'mschapv2' => false, 23 | ]; 24 | 25 | /** 26 | * @return string 27 | */ 28 | public function getMppe() { 29 | return $this->mppe; 30 | } 31 | 32 | /** 33 | * @param string $mppe 34 | */ 35 | public function setMppe( $mppe) { 36 | $this->mppe = $mppe; 37 | } 38 | 39 | /** 40 | * @return bool[] 41 | */ 42 | public function getAllowedAuth() { 43 | return $this->allowed_auth; 44 | } 45 | 46 | /** 47 | * @param bool[] $allowed_auth 48 | */ 49 | public function setAllowedAuth( $allowed_auth) { 50 | $this->allowed_auth = $allowed_auth; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/NetworkShare/Afp.php: -------------------------------------------------------------------------------- 1 | getService( self::API_NETWORK_SHARE_AFP); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\NetworkShare\AfpConfig::class); 23 | } 24 | 25 | /** 26 | * Update the Afp configuration 27 | * @param \alphayax\freebox\api\v3\models\NetworkShare\AfpConfig $afpConfig 28 | * @return \alphayax\freebox\api\v3\models\NetworkShare\AfpConfig 29 | */ 30 | public function setConfiguration( models\NetworkShare\AfpConfig $afpConfig){ 31 | $rest = $this->getService( self::API_NETWORK_SHARE_AFP); 32 | $rest->PUT( $afpConfig); 33 | 34 | return $rest->getResult( models\NetworkShare\AfpConfig::class); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Connection/Xdsl/XdslInfos.php: -------------------------------------------------------------------------------- 1 | initProperty( 'status' , XdslStatus::class); 27 | $this->initProperty( 'down' , XdslStats::class); 28 | $this->initProperty( 'up' , XdslStats::class); 29 | } 30 | 31 | /** 32 | * @return XdslStatus 33 | */ 34 | public function getStatus() { 35 | return $this->status; 36 | } 37 | 38 | /** 39 | * @return XdslStats 40 | */ 41 | public function getDown() { 42 | return $this->down; 43 | } 44 | 45 | /** 46 | * @return XdslStats 47 | */ 48 | public function getUp() { 49 | return $this->up; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /freebox/api/v4/models/Download/Stats/DhtStats.php: -------------------------------------------------------------------------------- 1 | enabled; 31 | } 32 | 33 | /** 34 | * @return int 35 | */ 36 | public function getNodeCount() 37 | { 38 | return $this->node_count; 39 | } 40 | 41 | /** 42 | * @return bool 43 | */ 44 | public function isEnabledIpv6() 45 | { 46 | return $this->enabled_ipv6; 47 | } 48 | 49 | /** 50 | * @return int 51 | */ 52 | public function getNodeCountIpv6() 53 | { 54 | return $this->node_count_ipv6; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /freebox/api/v3/models/Download/BlackListEntry.php: -------------------------------------------------------------------------------- 1 | host; 31 | } 32 | 33 | /** 34 | * @return string 35 | */ 36 | public function getReason() { 37 | return $this->reason; 38 | } 39 | 40 | /** 41 | * @return int 42 | */ 43 | public function getExpire() { 44 | return $this->expire; 45 | } 46 | 47 | /** 48 | * @return boolean 49 | */ 50 | public function isGlobal() { 51 | return $this->global; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /freebox/api/v4/models/AirMedia/AirMediaReceiver.php: -------------------------------------------------------------------------------- 1 | name; 34 | } 35 | 36 | /** 37 | * @return boolean 38 | */ 39 | public function isPasswordProtected() 40 | { 41 | return $this->password_protected; 42 | } 43 | 44 | /** 45 | * @return array 46 | */ 47 | public function getCapabilities() 48 | { 49 | return $this->capabilities; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/NetworkShare/Samba.php: -------------------------------------------------------------------------------- 1 | getService( self::API_NETWORK_SHARE_SAMBA); 20 | $rest->GET(); 21 | 22 | return $rest->getResult( models\NetworkShare\SambaConfig::class); 23 | } 24 | 25 | /** 26 | * Update the Samba configuration 27 | * @param \alphayax\freebox\api\v3\models\NetworkShare\SambaConfig $sambaConfig 28 | * @return \alphayax\freebox\api\v3\models\NetworkShare\SambaConfig 29 | */ 30 | public function setConfiguration( models\NetworkShare\SambaConfig $sambaConfig){ 31 | $rest = $this->getService( self::API_NETWORK_SHARE_SAMBA); 32 | $rest->PUT( $sambaConfig); 33 | 34 | return $rest->getResult( models\NetworkShare\SambaConfig::class); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /freebox/api/v3/symbols/WiFi/APStatus/State.php: -------------------------------------------------------------------------------- 1 | enabled; 25 | } 26 | 27 | /** 28 | * @param boolean $enabled 29 | */ 30 | public function setEnabled( $enabled) { 31 | $this->enabled = $enabled; 32 | } 33 | 34 | /** 35 | * @return string 36 | * @see alphayax\freebox\api\v3\symbols\WiFi\GlobalConfig\MacFilterState 37 | */ 38 | public function getMacFilterState() { 39 | return $this->mac_filter_state; 40 | } 41 | 42 | /** 43 | * @param string $mac_filter_state 44 | * @see alphayax\freebox\api\v3\symbols\WiFi\GlobalConfig\MacFilterState 45 | */ 46 | public function setMacFilterState( $mac_filter_state) { 47 | $this->mac_filter_state = $mac_filter_state; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /freebox/api/v3/models/VPN/Server/Config/OpenVPNConfig.php: -------------------------------------------------------------------------------- 1 | cipher; 27 | } 28 | 29 | /** 30 | * @param string $cipher 31 | * @see symbols\VPN\OpenVPNConfig\Cipher 32 | */ 33 | public function setCipher( $cipher) { 34 | $this->cipher = $cipher; 35 | } 36 | 37 | /** 38 | * @return boolean 39 | */ 40 | public function isDisableFragment() { 41 | return $this->disable_fragment; 42 | } 43 | 44 | /** 45 | * @param boolean $disable_fragment 46 | */ 47 | public function setDisableFragment( $disable_fragment) { 48 | $this->disable_fragment = $disable_fragment; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/AccessPoint/APCapabilities.php: -------------------------------------------------------------------------------- 1 | _2d4g = @$properties_x['2d4g']; 26 | $this->_5g = @$properties_x['5g']; 27 | $this->_60g = @$properties_x['60g']; 28 | } 29 | 30 | /** 31 | * @return int 32 | */ 33 | public function get2d4g() { 34 | return $this->_2d4g; 35 | } 36 | 37 | /** 38 | * @return int 39 | */ 40 | public function get5g() { 41 | return $this->_5g; 42 | } 43 | 44 | /** 45 | * @return int 46 | */ 47 | public function get60g() { 48 | return $this->_60g; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /freebox/api/v4/models/Download/BlackListEntry.php: -------------------------------------------------------------------------------- 1 | host; 34 | } 35 | 36 | /** 37 | * @return string 38 | */ 39 | public function getReason() 40 | { 41 | return $this->reason; 42 | } 43 | 44 | /** 45 | * @return int 46 | */ 47 | public function getExpire() 48 | { 49 | return $this->expire; 50 | } 51 | 52 | /** 53 | * @return boolean 54 | */ 55 | public function isGlobal() 56 | { 57 | return $this->global; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/Radar/ChannelUsage.php: -------------------------------------------------------------------------------- 1 | channel; 31 | } 32 | 33 | /** 34 | * @return string 35 | * @see alphayax\freebox\api\v3\symbols\WiFi\APConfig\Band 36 | */ 37 | public function getBand() { 38 | return $this->band; 39 | } 40 | 41 | /** 42 | * @return int 43 | */ 44 | public function getNoiseLevel() { 45 | return $this->noise_level; 46 | } 47 | 48 | /** 49 | * @return int 50 | */ 51 | public function getRxBusyPercent() { 52 | return $this->rx_busy_percent; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/SwitchPort/Config.php: -------------------------------------------------------------------------------- 1 | getService( $service); 22 | $rest->GET(); 23 | 24 | return $rest->getResult( models\SwitchPort\Config::class); 25 | } 26 | 27 | /** 28 | * Update a port configuration 29 | * @param \alphayax\freebox\api\v3\models\SwitchPort\Config $config 30 | * @return \alphayax\freebox\api\v3\models\SwitchPort\Config 31 | */ 32 | public function update( models\SwitchPort\Config $config){ 33 | $service = sprintf( static::API_SWITCH_PORT_CONFIG, $config->getId()); 34 | $rest = $this->getService( $service); 35 | $rest->PUT( $config); 36 | 37 | return $rest->getResult( models\SwitchPort\Config::class); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /freebox/api/v3/services/AirMedia/AirMediaReceiver.php: -------------------------------------------------------------------------------- 1 | getService( self::API_AIRMEDIA_RECEIVERS); 21 | $rest->GET(); 22 | 23 | return $rest->getResultAsArray( models\AirMedia\AirMediaReceiver::class); 24 | } 25 | 26 | /** 27 | * Sending a request to an AirMedia receiver 28 | * @param string $AirMediaReceiverName 29 | * @param models\AirMedia\AirMediaReceiverRequest $AirMediaReceiverRequest 30 | * @return bool 31 | */ 32 | public function sendRequest($AirMediaReceiverName, models\AirMedia\AirMediaReceiverRequest $AirMediaReceiverRequest){ 33 | $rest = $this->getService( self::API_AIRMEDIA_RECEIVERS . $AirMediaReceiverName . DIRECTORY_SEPARATOR); 34 | $rest->POST( $AirMediaReceiverRequest); 35 | 36 | return $rest->getSuccess(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/WiFi/Bss.php: -------------------------------------------------------------------------------- 1 | getService( self::API_WIFI_BSS); 20 | $rest->GET(); 21 | 22 | return $rest->getResultAsArray( models\WiFi\Bss\Bss::class); 23 | } 24 | 25 | /** 26 | * Get a specific BSS 27 | * @param $BssId 28 | * @return models\WiFi\Bss\Bss 29 | */ 30 | public function getFromId( $BssId) { 31 | $rest = $this->getService( self::API_WIFI_BSS . $BssId); 32 | $rest->GET(); 33 | 34 | return $rest->getResult( models\WiFi\Bss\Bss::class); 35 | } 36 | 37 | /** 38 | * Update a BSS 39 | * @param models\WiFi\Bss\Bss $Bss 40 | * @return models\WiFi\Bss\Bss 41 | */ 42 | public function update( models\WiFi\Bss\Bss $Bss) { 43 | $rest = $this->getService( self::API_WIFI_BSS . $Bss->getId()); 44 | $rest->PUT( $Bss); 45 | 46 | return $rest->getResult( models\WiFi\Bss\Bss::class); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /freebox/api/v3/models/SwitchPort/Config.php: -------------------------------------------------------------------------------- 1 | id; 26 | } 27 | 28 | /** 29 | * @return string 30 | * @see symbols\SwitchPort\Config\Duplex 31 | */ 32 | public function getDuplex() { 33 | return $this->duplex; 34 | } 35 | 36 | /** 37 | * @param string $duplex 38 | * @see symbols\SwitchPort\Config\Duplex 39 | */ 40 | public function setDuplex($duplex) { 41 | $this->duplex = $duplex; 42 | } 43 | 44 | /** 45 | * @return int|string 46 | * @see symbols\SwitchPort\Config\Speed 47 | */ 48 | public function getSpeed() { 49 | return $this->speed; 50 | } 51 | 52 | /** 53 | * @param int|string $speed 54 | * @see symbols\SwitchPort\Config\Speed 55 | */ 56 | public function setSpeed($speed) { 57 | $this->speed = $speed; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/APStation/Stats.php: -------------------------------------------------------------------------------- 1 | bitrate; 30 | } 31 | 32 | /** 33 | * @return int 34 | */ 35 | public function getMcs() { 36 | return $this->mcs; 37 | } 38 | 39 | /** 40 | * @return int 41 | */ 42 | public function getVhtMcs() { 43 | return $this->vht_mcs; 44 | } 45 | 46 | /** 47 | * @return string 48 | */ 49 | public function getWidth() { 50 | return $this->width; 51 | } 52 | 53 | /** 54 | * @return boolean 55 | */ 56 | public function isShortgi() { 57 | return $this->shortgi; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/VPN/Server/Config.php: -------------------------------------------------------------------------------- 1 | getService( $service); 22 | $rest->GET(); 23 | 24 | return $rest->getResult( models\VPN\Server\Config\ServerConfig::class); 25 | } 26 | 27 | /** 28 | * Update the VPN configuration 29 | * @param models\VPN\Server\Config\ServerConfig $serverConfig 30 | * @return models\VPN\Server\Config\ServerConfig 31 | */ 32 | public function setConfiguration( models\VPN\Server\Config\ServerConfig $serverConfig){ 33 | $service = sprintf( self::API_VPN_SERVER_CONFIG, $serverConfig->getId()); 34 | $rest = $this->getService( $service); 35 | $rest->PUT( $serverConfig); 36 | 37 | return $rest->getResult( models\VPN\Server\Config\ServerConfig::class); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /freebox/api/v4/services/AirMedia/Config.php: -------------------------------------------------------------------------------- 1 | callService('GET', self::API_AIRMEDIA_CONFIG); 26 | 27 | return $result->getModel(models\AirMedia\AirMediaConfig::class); 28 | } 29 | 30 | /** 31 | * Update the AirMedia configuration 32 | * @param models\AirMedia\AirMediaConfig $new_AirMediaConfig 33 | * @return models\AirMedia\AirMediaConfig 34 | * @throws \GuzzleHttp\Exception\GuzzleException 35 | * @throws \alphayax\freebox\Exception\FreeboxApiException 36 | */ 37 | public function setConfiguration(models\AirMedia\AirMediaConfig $new_AirMediaConfig) 38 | { 39 | $rest = $this->callService('PUT', self::API_AIRMEDIA_CONFIG, $new_AirMediaConfig); 40 | 41 | return $rest->getModel(models\AirMedia\AirMediaConfig::class); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /exemple/config/VPN.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /* 12 | /// VPN Config 13 | $VPNServerService = new \alphayax\freebox\api\v3\services\config\VPN\Server\Config( $App); 14 | $a = $VPNServerService->getConfigurationFromId( 'openvpn_routed'); 15 | print_r( $a); 16 | /// VPN Users 17 | $VPNUserService = new \alphayax\freebox\api\v3\services\config\VPN\Server\User( $App); 18 | //$Users = $VPNUserService->getAll(); 19 | //print_r( $Users); 20 | 21 | /// IP Pool 22 | $IPPoolService = new \alphayax\freebox\api\v3\services\config\VPN\Server\IpPool( $App); 23 | $resa = $IPPoolService->getReservations(); 24 | print_r( $resa); 25 | 26 | $CnxService = new \alphayax\freebox\api\v3\services\config\VPN\Server\Connection( $App); 27 | $connections = $CnxService->getAll(); 28 | print_r( $connections); 29 | */ 30 | 31 | /* 32 | $VPNClientService = new \alphayax\freebox\api\v3\services\config\VPN\Client\Config( $App); 33 | $VPNClientConfigurations = $VPNClientService->getAll(); 34 | print_r( $VPNClientConfigurations); 35 | 36 | $VPNClientStatus = new \alphayax\freebox\api\v3\services\config\VPN\Client\Status( $App); 37 | $VPNStatus = $VPNClientStatus->getStatus(); 38 | print_r( $VPNStatus); 39 | 40 | $VPNLogs = $VPNClientStatus->getLogs(); 41 | print_r( $VPNLogs); 42 | */ -------------------------------------------------------------------------------- /docs/services_v3/config/NAT/__NAMESPACE__.md: -------------------------------------------------------------------------------- 1 | 2 | # NAT 3 | 4 | **Namespace** : alphayax\freebox\api\v3\services\config\NAT 5 | 6 | # Overview 7 | 8 | - [IncomingPort](__NAMESPACE__.md#IncomingPort) 9 | - [PortForwarding](__NAMESPACE__.md#PortForwarding) 10 | - [DMZ](__NAMESPACE__.md#DMZ) 11 | 12 | 13 | --- 14 | 15 | ## IncomingPort 16 | 17 | **Class** : alphayax\freebox\api\v3\services\config\NAT\IncomingPort 18 | 19 | ### Public methods 20 | 21 | | Method | Description | 22 | |---|---| 23 | | `getAll` | Getting the list of incoming ports | 24 | | `getFromId` | Getting a specific incoming port | 25 | | `update` | Updating an incoming port | 26 | 27 | 28 | ## PortForwarding 29 | 30 | **Class** : alphayax\freebox\api\v3\services\config\NAT\PortForwarding 31 | 32 | ### Public methods 33 | 34 | | Method | Description | 35 | |---|---| 36 | | `getAll` | Getting the list of port forwarding | 37 | | `getById` | Getting a specific port forwarding | 38 | | `update` | Update a specific port forwarding | 39 | | `add` | Add a port forwarding | 40 | | `delete` | Delete a port forwarding | 41 | | `deleteById` | Delete a port forwarding with the specified id | 42 | 43 | 44 | ## DMZ 45 | 46 | **Class** : alphayax\freebox\api\v3\services\config\NAT\DMZ 47 | 48 | ### Public methods 49 | 50 | | Method | Description | 51 | |---|---| 52 | | `getConfiguration` | Get the current Dmz configuration | 53 | | `setConfiguration` | Update the current Dmz configuration | 54 | 55 | -------------------------------------------------------------------------------- /freebox/utils/Service.php: -------------------------------------------------------------------------------- 1 | application = $application; 20 | } 21 | 22 | /** 23 | * @param $service 24 | * @return \alphayax\freebox\utils\rest\Rest 25 | * @deprecated 26 | */ 27 | protected function getService( $service){ 28 | return new utils\rest\Rest( $this->application->getFreeboxApiHost() . $service); 29 | } 30 | 31 | /** 32 | * @param $verb 33 | * @param $service 34 | * @param $params 35 | * @return \alphayax\freebox\utils\FreeboxResponse 36 | * @throws \GuzzleHttp\Exception\GuzzleException 37 | */ 38 | protected function callService($verb, $service, $params = null) 39 | { 40 | $client = new Client(); 41 | 42 | $options_x = []; 43 | 44 | if( null != $params){ 45 | $options_x['json'] = $params; 46 | } 47 | 48 | $response = $client->request($verb, $this->application->getFreeboxApiHost() . $service, $options_x); 49 | 50 | return new FreeboxResponse( $response); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/Planning.php: -------------------------------------------------------------------------------- 1 | use_planning; 29 | } 30 | 31 | /** 32 | * @param boolean $use_planning 33 | */ 34 | public function setUsePlanning( $use_planning) { 35 | $this->use_planning = $use_planning; 36 | } 37 | 38 | /** 39 | * @return int 40 | */ 41 | public function getResolution() { 42 | return $this->resolution; 43 | } 44 | 45 | /** 46 | * @return \string[] 47 | */ 48 | public function getMapping() { 49 | return $this->mapping; 50 | } 51 | 52 | /** 53 | * @param \string[] $mapping 54 | */ 55 | public function setMapping( $mapping) { 56 | $this->mapping = $mapping; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /freebox/api/v3/services/config/WiFi/Config.php: -------------------------------------------------------------------------------- 1 | getService( self::API_WIFI_CONFIG); 21 | $rest->GET(); 22 | 23 | return $rest->getResult( models\WiFi\GlobalConfig::class); 24 | } 25 | 26 | /** 27 | * Update the global wifi configuration 28 | * @param models\WiFi\GlobalConfig $globalConfig 29 | * @return models\WiFi\GlobalConfig 30 | */ 31 | public function setConfiguration( models\WiFi\GlobalConfig $globalConfig){ 32 | $rest = $this->getService( self::API_WIFI_CONFIG); 33 | $rest->PUT( $globalConfig); 34 | 35 | return $rest->getResult( models\WiFi\GlobalConfig::class); 36 | } 37 | 38 | /** 39 | * Reset Wifi to default configuration 40 | * @return bool 41 | */ 42 | public function resetConfiguration(){ 43 | $rest = $this->getService( self::API_WIFI_CONFIG_RESET); 44 | $rest->POST(); 45 | 46 | return $rest->getSuccess(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /freebox/api/v3/models/LCDConfig.php: -------------------------------------------------------------------------------- 1 | brightness; 25 | } 26 | 27 | /** 28 | * @param int $brightness 29 | */ 30 | public function setBrightness( $brightness){ 31 | $this->brightness = $brightness; 32 | } 33 | 34 | /** 35 | * @return boolean 36 | */ 37 | public function isOrientationForced(){ 38 | return $this->orientation_forced; 39 | } 40 | 41 | /** 42 | * @param boolean $orientation_forced 43 | */ 44 | public function setOrientationForced( $orientation_forced){ 45 | $this->orientation_forced = $orientation_forced; 46 | } 47 | 48 | /** 49 | * @return int 50 | */ 51 | public function getOrientation(){ 52 | return $this->orientation; 53 | } 54 | 55 | /** 56 | * @param int $orientation 57 | */ 58 | public function setOrientation( $orientation){ 59 | $this->orientation = $orientation; 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /freebox/api/v3/models/WiFi/Bss/Status.php: -------------------------------------------------------------------------------- 1 | state; 39 | } 40 | 41 | /** 42 | * @return int 43 | */ 44 | public function getStaCount() { 45 | return $this->sta_count; 46 | } 47 | 48 | /** 49 | * @return int 50 | */ 51 | public function getAuthorizedStaCount() { 52 | return $this->authorized_sta_count; 53 | } 54 | 55 | /** 56 | * @return boolean 57 | */ 58 | public function isMainBss() { 59 | return $this->is_main_bss; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /freebox/utils/rest/RestAuth.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class RestAuth extends Rest { 12 | 13 | /** @var string */ 14 | protected $sessionToken = ''; 15 | 16 | /** 17 | * @param mixed $curlPostData 18 | */ 19 | public function GET( $curlPostData = null){ 20 | $this->add_XFbxAppAuth_Header(); 21 | parent::GET( $curlPostData); 22 | } 23 | 24 | /** 25 | * @param $curlPostData 26 | */ 27 | public function POST( $curlPostData = null){ 28 | $this->add_XFbxAppAuth_Header(); 29 | parent::POST( $curlPostData); 30 | } 31 | 32 | /** 33 | * @param $curlPostData 34 | */ 35 | public function PUT( $curlPostData = null){ 36 | $this->add_XFbxAppAuth_Header(); 37 | parent::PUT( $curlPostData); 38 | } 39 | 40 | /** 41 | * @param $curlPostData 42 | */ 43 | public function DELETE( $curlPostData = null){ 44 | $this->add_XFbxAppAuth_Header(); 45 | parent::DELETE( $curlPostData); 46 | } 47 | 48 | /** 49 | * Add the session token in the X-Fbx-App-Auth Header 50 | */ 51 | protected function add_XFbxAppAuth_Header(){ 52 | $this->addHeader( 'X-Fbx-App-Auth', $this->sessionToken); 53 | } 54 | 55 | /** 56 | * @param $sessionToken 57 | */ 58 | public function setSessionToken( $sessionToken){ 59 | $this->sessionToken = $sessionToken; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /exemple/config/Connection.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /* 12 | /// Get connection status 13 | $CnxService = new \alphayax\freebox\api\v3\services\config\Connection\Connection( $App); 14 | $CnxStatus = $CnxService->getStatus(); 15 | print_r( $CnxStatus); 16 | 17 | /// Get connection configuration 18 | $CnxConfig = $CnxService->getConfiguration(); 19 | print_r( $CnxConfig); 20 | 21 | /// Update connection configuration 22 | $CnxConfig->setPing( false); 23 | $CnxConfig = $CnxService->setConfiguration( $CnxConfig); 24 | print_r( $CnxConfig); 25 | 26 | /// IPv6 config 27 | $IPv6Config = $CnxService->getIPv6Configuration(); 28 | print_r( $IPv6Config); 29 | */ 30 | 31 | /* 32 | /// XDSL Status 33 | $XDSLService = new \alphayax\freebox\api\v3\services\config\Connection\Xdsl( $App); 34 | $XdslStatus = $XDSLService->getStatus(); 35 | print_r( $XdslStatus); 36 | */ 37 | 38 | /* 39 | /// FTTH Status 40 | $FTTHService = new \alphayax\freebox\api\v3\services\config\Connection\Ftth( $App); 41 | $FtthStatus = $FTTHService->getStatus(); 42 | print_r( $FtthStatus); 43 | */ 44 | 45 | /* 46 | /// Ovh Status 47 | $DynDnsService = new \alphayax\freebox\api\v3\services\config\Connection\DynDns\Ovh( $App); 48 | $OvhStatus = $DynDnsService->getStatus(); 49 | print_r( $OvhStatus); 50 | 51 | $OvhConfig = $DynDnsService->getConfig(); 52 | print_r( $OvhConfig); 53 | */ 54 | 55 | -------------------------------------------------------------------------------- /exemple/config/WiFi.php: -------------------------------------------------------------------------------- 1 | authorize(); 9 | $App->openSession(); 10 | 11 | /* 12 | $WiFiConfigService = new \alphayax\freebox\api\v3\services\config\WiFi\Config( $App); 13 | $a = $WiFiConfigService->getConfiguration(); 14 | print_r( $a); 15 | */ 16 | 17 | 18 | /* 19 | $WiFiAccessPointService = new \alphayax\freebox\api\v3\services\config\WiFi\AccessPoint( $App); 20 | $AccessPoints = $WiFiAccessPointService->getAll(); 21 | print_r( $AccessPoints); 22 | 23 | $AllowedComb = $WiFiAccessPointService->getAllowedCombFromId( $AccessPoints[0]->getId()); 24 | print_r( $AllowedComb); 25 | 26 | $Stations = $WiFiAccessPointService->getStationsFromId( $AccessPoints[1]->getId()); 27 | print_r( $Stations); 28 | 29 | $Neighbors = $WiFiAccessPointService->getNeighborsFromId( $AccessPoints[1]->getId()); 30 | print_r( $Neighbors); 31 | 32 | $ChannelUsages = $WiFiAccessPointService->getChannelUsageFromId( $AccessPoints[1]->getId()); 33 | print_r( $ChannelUsages); 34 | 35 | /* 36 | $WiFiBssService = new \alphayax\freebox\api\v3\services\config\WiFi\Bss( $App); 37 | $Bsss = $WiFiBssService->getAll(); 38 | print_r( $Bsss); 39 | 40 | $Bss = $WiFiBssService->getFromId( $Bsss[0]->getId()); 41 | print_r( $Bss); 42 | */ 43 | 44 | $WiFiPlanningService = new \alphayax\freebox\api\v3\services\config\WiFi\Planning( $App); 45 | $Planning = $WiFiPlanningService->getPlanning(); 46 | print_r( $Planning); 47 | 48 | -------------------------------------------------------------------------------- /freebox/api/v3/models/FileSystem/ShareLink.php: -------------------------------------------------------------------------------- 1 | token; 31 | } 32 | 33 | /** 34 | * @return string 35 | */ 36 | public function getPath(){ 37 | return $this->path; 38 | } 39 | 40 | /** 41 | * @return string 42 | */ 43 | public function getName(){ 44 | return $this->name; 45 | } 46 | 47 | /** 48 | * @return int 49 | */ 50 | public function getExpire(){ 51 | return $this->expire; 52 | } 53 | 54 | /** 55 | * @return string 56 | */ 57 | public function getFullurl(){ 58 | return $this->fullurl; 59 | } 60 | 61 | } 62 | --------------------------------------------------------------------------------