Compare commits

...

32 Commits

Author SHA1 Message Date
alphayax 550a5f864a Download : Fix bug in update methd 2016-09-18 14:39:25 +02:00
alphayax 7d53da1aaf Update composer.json (For Rest minor fixs) 2016-09-04 13:52:28 +02:00
alphayax 23b34f4e8e Association getters now return values 2016-08-07 13:47:53 +02:00
alphayax eb8ff666b2 Add setter for Association::track_id 2016-08-07 13:44:49 +02:00
alphayax 9e23abb41a Rename Authorize as Association
Externalize construct content
2016-08-07 13:35:40 +02:00
alphayax 174eff7dcb Add app_token generation 2016-08-06 14:57:21 +02:00
alphayax 5599328df0 Update composer.json (add keywords) 2016-06-29 08:13:30 +02:00
alphayax 0e9875735c Update rest to 1.1.0 2016-06-27 23:06:52 +02:00
alphayax f096d8c596 Fix dependencies artefacts 2016-06-27 08:23:43 +02:00
alphayax 0dc813df5d Update composer dependencies 2016-06-26 14:55:19 +02:00
alphayax 64836862cc Update code style 2016-06-25 14:39:11 +02:00
alphayax 538647b210 Update doc 2016-06-25 14:28:08 +02:00
alphayax 4bdc0c05d0 Update code style
Cleanup unused code
2016-06-25 14:23:07 +02:00
alphayax fe9fb2852b Split unauthentificated and authentificated services 2016-06-25 14:13:12 +02:00
alphayax e4307fedac Move Model namespace 2016-06-24 21:41:17 +02:00
alphayax c5c7e1f74b Move Service namespace 2016-06-24 21:35:56 +02:00
alphayax 603e648415 Simplify services aquisitions 2016-06-24 21:30:52 +02:00
alphayax dbfca3f6a4 Simplify Rest response check 2016-06-24 16:34:06 +02:00
alphayax 6b9f372cd2 Add FreeboxApiException when a service fail 2016-06-24 16:18:37 +02:00
alphayax 7619351a35 Add App permissions infos 2016-06-23 13:31:34 +02:00
alphayax 72d1a00cba Add infos about remote connexion 2016-06-23 13:07:48 +02:00
alphayax d784eb826f Add infos about remote connexion 2016-06-23 13:04:04 +02:00
alphayax 9a8fbc75bd Update composer.json 2016-06-22 13:30:41 +02:00
alphayax 16b83e2dc0 Add remote access 2016-06-21 13:26:05 +02:00
alphayax d545be09a1 Add APIVersion API 2016-06-21 13:06:30 +02:00
alphayax 1ac9811d6e Minor fix (notice)
Update composer.json
2016-06-18 20:25:49 +02:00
alphayax 59d4316ec9 Fix FileSystem Listing during tests 2016-06-14 22:38:16 +02:00
alphayax 6700b1dbb3 Update Services & Documentation 2016-06-12 18:41:25 +02:00
alphayax 6f19bfcdb7 Update FsTask service Documentation 2016-06-12 16:28:58 +02:00
alphayax af7a15c8e8 Update Documentation & readme
Clean up & comment download & FileSystem services
Refractor public functions services
2016-06-12 16:25:26 +02:00
alphayax 13389615be Update Documentation & readme 2016-06-12 11:16:37 +02:00
alphayax bf2b943e1f Add Documentation 2016-06-11 23:16:01 +02:00
214 changed files with 2271 additions and 1872 deletions

134
README.md
View File

@ -9,7 +9,8 @@
[![Coverage](https://api.codacy.com/project/badge/Coverage/f3569cf671f04b8ab6d699be3fd011e5)](https://www.codacy.com/app/alphayax/freebox_api_php?utm_source=github.com&utm_medium=referral&utm_content=alphayax/freebox_api_php&utm_campaign=Badge_Coverage)
[![Codacy](https://api.codacy.com/project/badge/Grade/f3569cf671f04b8ab6d699be3fd011e5)](https://www.codacy.com/app/alphayax/freebox_api_php?utm_source=github.com&utm_medium=referral&utm_content=alphayax/freebox_api_php&utm_campaign=Badge_Grade)
![license](https://img.shields.io/packagist/l/alphayax/freebox_api_php.svg)
[![License](https://poser.pugx.org/alphayax/freebox_api_php/license)](https://packagist.org/packages/alphayax/freebox_api_php)
[![Total Downloads](https://poser.pugx.org/alphayax/freebox_api_php/downloads)](https://packagist.org/packages/alphayax/freebox_api_php)
Implementation PHP de l'API de la freebox (dans sa version 3).
@ -23,83 +24,41 @@ Pensez à installer les dependences :)
L'intégralité des fonctionnalités de l'API Freebox (v3) sont implémentées :
- [AirMedia](docs/AirMedia.md)
- [Call](docs/Call.md)
- FileSystem
- FileSystem (Core)
- FsTask
- FsOperation
- FsListing
- FileUpload
- FileSharing
- Download
- Download (core)
- Download Stats
- Download Files
- Download Configuration
- RSS Feed
- Bittorent
- Trackers
- Peers
- BlackList
- RRD
- Storage
- Disk
- Partition
- Configuration
- Connection
- Connection (Core)
- xDSL
- FTTH
- DynDns
- DHCP
- FTP
- LAN
- Lan (Core)
- Lan Browser
- Wake On Lan
- Network Share
- Samba
- Afp
- Switch
- Statistics
- Status
- Config
- System
- LCD
- NAT
- Dmz
- Port Forwarding
- Incoming Port
- UPnP
- AV
- IGD
- VPN
- Client
- Server
- WiFi
- Config (core)
- Access Points
- AP (core)
- Allowed Comb
- Stations
- Radar
- Channel Usage
- BSS
- Planning
- Mac Filter
- Parental Control
- Filter
- Planning
- [AirMedia](docs/services/AirMedia/AirMedia.md)
- [Call](docs/services/Call/Call.md)
- [Configuration](docs/services/config/config.md)
- [Download](docs/services/download/download.md)
- [FileSystem](docs/services/FileSystem/FileSystem.md)
- [Parental Control](docs/services/ParentalControl/ParentalControl.md)
- [RRD](docs/services/RRD/RRD.md)
- [Storage](docs/services/Storage/Storage.md)
Un document complet repertorie l'ensemble des services implémentées : [services.md](docs/services/services.md)
## Utilisation
### Application
La premiere étape est de créer une application.
La seconde est de demander l'autorisation de connexion a la freebox (cf: cadrant led du Freebox Server)
La derniere est de récuperer une session pour utiliser les divers services de l'API
L'objet `\alphayax\freebox\utils\Application` représente votre application. Vous devrez
créer une instance de cette classe et la transmettre aux services que vous souhaitez utiliser.
#### Association
Pour acceder aux services proposés par l'API de la freebox, vous deverez
autoriser votre application. Cette procedure impose que vous soyez connecté
au réseau local de votre Freebox lors de "l'association" et que vous ayez la
Freebox a portée de main. L'application sauvegarde automatiquement le token
retourné par la frebox et cette procedure ne sera plus a reproduire.
Notez que pour modifier les droits d'accès aux differents services, vous deverez
passer par l'interface web locale : [http://mafreebox.freebox.fr/login.php].
> Parametres de la freebox > Divers > Gestion des accès > Applications
1. Créer un objet application.
2. Demander l'autorisation de connexion a la freebox (cf: cadrant led du Freebox Server)
3. Récuperer une session pour utiliser les divers services de l'API
```php
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.example', 'Freebox PHP API Exemple', '0.0.1');
@ -107,6 +66,26 @@ $App->authorize();
$App->openSession();
```
#### Accès local
L'accès local est activé par défaut. Une fois l'application créer et la session ouverte, vous
pouvez utiliser directement les services auquels l'application à acces.
#### Accès distant
Pour pouvoir utiliser l'accès distant, il vous faudra le token associé a votre application.
Ce token s'obtient automatiquement après l'association faite via l'appel à la méthode `authorize()`.
Le token est ecrit dans le fichier `app_token`. Il est également disponible via la methode `\alphayax\freebox\utils\Application::getAppToken()`.
Une fois le token obtenu, vous pouvez proceder comme suit :
```php
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.version', 'Freebox PHP API Example (Version)', '1.0.0');
$App->setFreeboxApiHost( 'https://xxx.freeboxos.fr:17105'); // A remplacer par votre host
$App->setAppToken( 'xxxxxxxxxxxxxxxxxxxx'); // A remplacer par votre token
$App->openSession();
```
### Services
Les appels aux services de l'API se font par l'intermédiaire de services.
Ces derniers possedent les méthodes pour récuperer, ajouter ou mettre a jour des données.
@ -119,8 +98,6 @@ Voici un exemple d'utilisation de l'API System :
```php
$System = new \alphayax\freebox\api\v3\services\config\System( $App);
/** @var \alphayax\freebox\api\v3\models\SystemConfig $SystemConfig */
$SystemConfig = $System->getConfiguration();
print_r( $SystemConfig);
@ -173,5 +150,10 @@ Les exemples sont disponibles dans le repertoire `exemple`. Ils sont classés pa
- `DlConfig` : Affichage des configurations de téléchargement (bt, nntp...)
- `dl_rss` : Un script qui parse les flux RSS et qui rajoute en téléchagement les items correspondant a une expression réguliere
- `Bittorrent` : Affiche des infos sur des telechargements bittorent
- `ParentalControl`
- `Filter` : Retourne la config et les filtres actuels
- `Storage`
- `Disk` : Retourne des informations sur les disques connectés aux freebox
- `Partition` : Retourne des infos sur ces disques. Possibilité de verification ou de formatage
- `remote` : Un exemple de connexion distant
- `version` : Affichage de la version de l'API de la freebox

View File

@ -10,15 +10,24 @@
"email": "alphayax@gmail.com"
}
],
"require" : {
"keywords": [
"freebox",
"api",
"rest",
"Freebox revolution",
"download"
],
"require": {
"php": ">=5.5.0",
"alphayax/php_utils" : "^1.0.2",
"ext-curl": "*",
"alphayax/rest": "^1.1.2",
"monolog/monolog": "^1.9.1"
},
"require-dev" : {
"require-dev": {
"alphayax/phpdoc_md": "^1.0.4",
"codacy/coverage": "<2.0.0",
"phpunit/phpunit": "^5.4.0",
"zf1/zend-reflection": "1.12.*",
"codacy/coverage": "<2.0.0"
"zf1/zend-reflection": "1.12.*"
},
"autoload": {
"psr-4": {

View File

@ -1,18 +0,0 @@
# AirMedia
## AirMedia
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\AirMedia | AirMedia |
### Configuration
- getConfiguration : Récupère la configuration courrante
- setConfiguration : Définit la configuration
### AirMedia Receivers
- getAirMediaReceivers : Retourne la liste des AirMedia Receivers connectés a la freebox
- sendRequestToAirMediaReceiver : Envoie une Requete a un AirMedia Receiver donné

View File

@ -1,87 +0,0 @@
# Call
- CallEntry
- ContactEntry
- ContactEmail
- ContactAddress
- ContactNumber
- ContactUrl
## CallEntry
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\Call | CallEntry |
- getAll : Retourne tous les appels
- getFromId : Retourne un appel donné
- delete : Supprime un appel de la liste des appels
- deleteFromId : Supprime un appel de la liste des appels
- update : Met à jour les informations d'un appel
## ContactEntry
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\Call | ContactEntry |
- getAll : Retourne la liste de tous les contacts
- getFromId : Retourne un contact donné
- create : Ajoute une nouveau contact
- delete : Supprime un contact
- deleteFromId : Supprime un contact
- update : Met à jour les informations d'un contact
- getContactNumbersFromContactId : Retourne les numéros associés a un contact
- getContactAddressesFromContactId : Retourne les adresses associés a un contact
- getContactEmailsFromContactId : Retourne les emails associés a un contact
- getContactUrlsFromContactId : Retourne les URLs associés a un contact
### Contact Email
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\Call | ContactEmail |
- getFromId
- create
- delete
- deleteFromId
- update
### Contact Address
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\Call | ContactAddress |
- getFromId
- create
- delete
- deleteFromId
- update
### Contact Number
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\Call | ContactNumber |
- getFromId
- create
- delete
- deleteFromId
- update
### Contact URL
| Namespace | Class |
|---|---|
| alphayax\freebox\api\v3\services\Call | ContactUrl |
- getFromId
- create
- delete
- deleteFromId
- update

View File

@ -1,18 +0,0 @@
# Call
- [Contact](./Call/Contact/Contact.md)
## CallEntry
**Namespace** : alphayax\freebox\api\v3\services\Call
### Public methods
| Method | Description |
|---|---|
| `getAll` | List every calls |
| `getFromId` | Access a given call entry |
| `delete` | Delete a call entry |
| `deleteFromId` | Delete a call entry |
| `update` | Update a given call entry |

View File

@ -1,84 +0,0 @@
# FileSystem
## FileSharingLink
**Namespace** : alphayax\freebox\api\v3\services\FileSystem
### Public methods
| Method | Description |
|---|---|
| `getAll` | Retrieve a File Sharing link |
| `getFromToken` | |
| `deleteFromToken` | Delete a File Sharing link
Deletes the ShareLink task with the given token, if the task was running, stop it. |
| `create` | Create a File Sharing link |
## FileSystemListing
**Namespace** : alphayax\freebox\api\v3\services\FileSystem
### Public methods
| Method | Description |
|---|---|
| `getFilesFromDirectory` | |
| `getFileInformation` | Get file information |
## FileSystemOperation
**Namespace** : alphayax\freebox\api\v3\services\FileSystem
### Public methods
| Method | Description |
|---|---|
| `move` | Move files |
| `copy` | Copy files |
| `remove` | Delete files |
| `cat` | Concatenate files (Miaw ^^) |
| `archive` | Create an archive |
| `extract` | Extract an archive |
| `repair` | Repair files from a .par2 |
| `computeHash` | Hash a file. This operation can take some time. To get the hash value,
the returned task must have succeed and be in the state “done”. |
| `getHashValue` | Get the hash value
To get the hash, the task must have succeed and be in the state “done”. |
| `createDirectory` | Create a directory
Contrary to other file system tasks, this operation is done synchronously. |
| `rename` | Rename a file/folder
Contrary to other file system tasks, this operation is done synchronously. |
| `download` | Download a file from the freebox server |
## FileSystemTask
**Namespace** : alphayax\freebox\api\v3\services\FileSystem
### Public methods
| Method | Description |
|---|---|
| `getAllTasks` | |
| `getTaskById` | |
| `deleteTask` | |
| `deleteTaskById` | |
| `updateTask` | |
## FileUpload
**Namespace** : alphayax\freebox\api\v3\services\FileSystem
### Public methods
| Method | Description |
|---|---|
| `createAuthorization` | Create a file upload authorization |
| `uploadFile` | Send the content of the FileUpload task |
| `getAll` | Get the list of uploads |
| `getFromId` | Track an upload status |
| `cancelFromId` | Cancel the given FileUpload closing the connection
The upload status must be in_progress |
| `deleteFromId` | Delete the given FileUpload closing the connection if needed |
| `cleanTerminated` | Deletes all the FileUpload not in_progress |

View File

@ -1,31 +0,0 @@
# ParentalControl
## Filter
**Namespace** : alphayax\freebox\api\v3\services\ParentalControl
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | |
| `setConfiguration` | |
| `getAll` | Get the list of disks |
| `getFromId` | |
| `update` | |
| `delete` | |
| `deleteFromId` | |
| `add` | |
## FilterPlanning
**Namespace** : alphayax\freebox\api\v3\services\ParentalControl
### Public methods
| Method | Description |
|---|---|
| `getFromFilterId` | |
| `setFromFilterId` | |

View File

@ -1,13 +0,0 @@
# RRD
## Fetch
**Namespace** : alphayax\freebox\api\v3\services\RRD
### Public methods
| Method | Description |
|---|---|
| `getStats` | |

View File

@ -1,30 +0,0 @@
# Storage
## Disk
**Namespace** : alphayax\freebox\api\v3\services\Storage
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of disks |
| `getFromId` | Get a given disk info |
| `update` | Update a disk state |
| `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. |
## Partition
**Namespace** : alphayax\freebox\api\v3\services\Storage
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of partitions |
| `getFromId` | Get a given partition info |
| `check` | Checks the partition with the given id
*NOTE* once started you can monitor the fsck process getting the partition information |

View File

@ -1,29 +0,0 @@
# LAN
## Browser
**Namespace** : alphayax\freebox\api\v3\services\config\LAN
### Public methods
| Method | Description |
|---|---|
| `getBrowsableInterfaces` | |
| `getHostsFromInterface` | |
| `getHostsFromInterfaceName` | |
| `getHostFromId` | |
| `updateHostFromInterfaceId` | |
| `wakeOnLan` | Send Wake ok Lan packet to an host |
## LAN
**Namespace** : alphayax\freebox\api\v3\services\config\LAN
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | |
| `setConfiguration` | |

View File

@ -1,5 +0,0 @@
# VPN
- [Client](./config/VPN/Client/Client.md)
- [Server](./config/VPN/Server/Server.md)

View File

@ -1,71 +0,0 @@
# WiFi
## AccessPoint
**Namespace** : alphayax\freebox\api\v3\services\config\WiFi
### Public methods
| Method | Description |
|---|---|
| `getAll` | |
| `getFromId` | |
| `getAllowedCombFromId` | To be able to allow user to pick a valid channel combination for a given AP you should use the following api to retrieve the list of allowed channel combination. |
| `getStationsFromId` | To be able to allow user to pick a valid channel combination for a given AP you should use the following api to retrieve the list of allowed channel combination. |
| `update` | |
| `getNeighborsFromId` | Get the list of Neighbor seen by the AP |
| `refreshNeighborsScan` | WARNING during the scan the AP will be unavailable. Therefore, you should ask for user confirmation prior to launching a scan.
Once launched you should wait until the ap state comes back from scanning to get updated info. |
| `getChannelUsageFromId` | List Wi-Fi channels usage |
## Bss
**Namespace** : alphayax\freebox\api\v3\services\config\WiFi
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of Freebox Access Points |
| `getFromId` | Get the list of Freebox Access Points |
| `update` | Get the list of Freebox Access Points |
## Config
**Namespace** : alphayax\freebox\api\v3\services\config\WiFi
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | |
| `setConfiguration` | |
| `resetConfiguration` | Reset Wifi to default configuration |
## MacFilter
**Namespace** : alphayax\freebox\api\v3\services\config\WiFi
### Public methods
| Method | Description |
|---|---|
| `getAll` | |
| `getFromId` | |
| `update` | |
| `delete` | |
| `deleteFromId` | |
| `add` | |
## Planning
**Namespace** : alphayax\freebox\api\v3\services\config\WiFi
### Public methods
| Method | Description |
|---|---|
| `getPlanning` | |
| `update` | |

View File

@ -1,67 +0,0 @@
# config
- [Connection](./config/Connection/Connection.md)
- [LAN](./config/LAN/LAN.md)
- [NAT](./config/NAT/NAT.md)
- [NetworkShare](./config/NetworkShare/NetworkShare.md)
- [SwitchPort](./config/SwitchPort/SwitchPort.md)
- [UPnP](./config/UPnP/UPnP.md)
- [VPN](./config/VPN/VPN.md)
- [WiFi](./config/WiFi/WiFi.md)
## DHCP
**Namespace** : alphayax\freebox\api\v3\services\config
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | |
| `setConfiguration` | |
## FTP
**Namespace** : alphayax\freebox\api\v3\services\config
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | |
| `setConfiguration` | |
## Freeplug
**Namespace** : alphayax\freebox\api\v3\services\config
### Public methods
| Method | Description |
|---|---|
| `getNetworks` | Get the current system info |
| `getFromId` | Get a particular Freeplug information |
| `resetFromId` | Reset a Freeplug |
## LCD
**Namespace** : alphayax\freebox\api\v3\services\config
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | |
| `setConfiguration` | |
## System
**Namespace** : alphayax\freebox\api\v3\services\config
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current system info |
| `reboot` | Reboot the Freebox |

View File

@ -1,98 +0,0 @@
# download
## BlackList
**Namespace** : alphayax\freebox\api\v3\services\download
### Public methods
| Method | Description |
|---|---|
| `getAllFromDownloadTaskId` | Get the list of blacklist entries for a given download
Attempting to call this method on a download other than bittorent will fail. |
| `emptyBlackListFromDownloadId` | Empty the blacklist for a given download
This call allow to remove all global entries, and entries related to the given download |
| `removeBlackListEntry` | Delete a particular blacklist entry |
| `addBlackListEntry` | Add a blacklist entry |
## Configuration
**Namespace** : alphayax\freebox\api\v3\services\download
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current Download configuration |
| `setConfiguration` | Update the Download configuration |
| `updateThrottlingMode` | You can force the throttling mode using this method.
You can use any of the throttling modes defined in DlThrottlingConfig. |
## Download
**Namespace** : alphayax\freebox\api\v3\services\download
### Public methods
| Method | Description |
|---|---|
| `getAll` | Returns the collection of all Download tasks |
| `getFromId` | Returns the Download task with the given id |
| `update` | Update a download task |
| `addFromUrl` | |
| `addFromUrls` | |
| `addFromFile` | |
| `getStats` | Returns the Download task with the given id |
| `getFilesFromId` | Returns the Download task with the given id |
## Feed
**Namespace** : alphayax\freebox\api\v3\services\download
### Public methods
| Method | Description |
|---|---|
| `getAllFeeds` | Get the list of all download Feeds |
| `getFeedFromId` | Gets the DownloadFeed with the given id |
| `addFeed` | Add a Download Feed |
| `removeFeed` | Delete a Download Feed |
| `updateFeed` | Update a Download Feed |
| `refreshFeed` | Remotely fetches the RSS feed and updates it.
Note that if the remote feed specifies a TTL, trying to update before the ttl will result in feed_is_recent error |
| `refreshFeeds` | Remotely fetches the RSS feed and updates it.
Note that if the remote feed specifies a TTL, trying to update before the ttl will result in feed_is_recent error |
| `getFeedItems` | Returns the collection of all DownloadFeedItems for a given DownloadFeed |
| `updateFeedItem` | Returns the collection of all DownloadFeedItems for a given DownloadFeed |
| `downloadFeedItem` | Returns the collection of all DownloadFeedItems for a given DownloadFeed |
| `markFeedAsRead` | Returns the collection of all DownloadFeedItems for a given DownloadFeed |
## Peer
**Namespace** : alphayax\freebox\api\v3\services\download
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of peers for a given Download
Attempting to call this method on a download other than bittorent will fail |
## Tracker
**Namespace** : alphayax\freebox\api\v3\services\download
### Public methods
| Method | Description |
|---|---|
| `getAll` | Each torrent Download task has one or more DownloadTracker.
Each tracker is identified by its announce URL. |
| `add` | Add a new tracker
Attempting to call this method on a download other than bittorent will fail |
| `remove` | Remove a tracker
Attempting to call this method on a download other than bittorent will fail |
| `update` | Update a tracker
Attempting to call this method on a download other than bittorent will fail |

11
docs/generate.php Normal file
View File

@ -0,0 +1,11 @@
<?php
require_once '../vendor/autoload.php';
$srcDir = __DIR__.'/../freebox/api/v3/services';
$namespace = 'alphayax\freebox\api\v3\services';
/// Services documentation
$gen = new \alphayax\mdGen\MdGen( $srcDir, $namespace);
$gen->filterSubClasses( \alphayax\freebox\utils\Service::class);
$gen->generate( 'services');

View File

@ -1,29 +0,0 @@
# login
## Authorize
**Namespace** : alphayax\freebox\api\v3\services\login
### Public methods
| Method | Description |
|---|---|
| `__construct` | Authorize constructor. |
| `ask_authorization` | Contact the freebox and ask for App auth |
| `get_authorization_status` | |
| `getStatus` | |
| `getAppToken` | |
## Session
**Namespace** : alphayax\freebox\api\v3\services\login
### Public methods
| Method | Description |
|---|---|
| `ask_login_status` | |
| `create_session` | |
| `getSessionToken` | |

View File

@ -1,12 +0,0 @@
# services
- [FileSystem](./FileSystem/FileSystem.md)
- [ParentalControl](./ParentalControl/ParentalControl.md)
- [RRD](./RRD/RRD.md)
- [Storage](./Storage/Storage.md)
- [AirMedia](./AirMedia/AirMedia.md)
- [Call](./Call/Call.md)
- [config](./config/config.md)
- [download](./download/download.md)
- [login](./login/login.md)

View File

@ -1,10 +1,17 @@
# AirMedia
**Namespace** : alphayax\freebox\api\v3\services\AirMedia
# Overview
- [AirMediaReceiver](AirMedia.md#AirMediaReceiver)
- [Config](AirMedia.md#Config)
<a name="AirMediaReceiver"></a>
## AirMediaReceiver
**Namespace** : alphayax\freebox\api\v3\services\AirMedia
**Class** : alphayax\freebox\api\v3\services\AirMedia\AirMediaReceiver
### Public methods
@ -13,9 +20,10 @@
| `getAll` | Get the list of AirMediaReceiver connected to the Freebox Server |
| `sendRequest` | Sending a request to an AirMedia receiver |
<a name="Config"></a>
## Config
**Namespace** : alphayax\freebox\api\v3\services\AirMedia
**Class** : alphayax\freebox\api\v3\services\AirMedia\Config
### Public methods

View File

@ -0,0 +1,29 @@
# Call
**Namespace** : alphayax\freebox\api\v3\services\Call
# Overview
- [Contact](./Contact/Contact.md)
- [ContactNumber](Contact/Contact.md#ContactNumber)
- [ContactAddress](Contact/Contact.md#ContactAddress)
- [ContactUrl](Contact/Contact.md#ContactUrl)
- [ContactEmail](Contact/Contact.md#ContactEmail)
- [ContactEntry](Contact/Contact.md#ContactEntry)
- [CallEntry](Call.md#CallEntry)
<a name="CallEntry"></a>
## CallEntry
**Class** : alphayax\freebox\api\v3\services\Call\CallEntry
### Public methods
| Method | Description |
|---|---|
| `getAll` | List every calls |
| `getFromId` | Access a given call entry |
| `delete` | Delete a call entry |
| `deleteFromId` | Delete a call entry |
| `update` | Update a given call entry |

View File

@ -1,57 +1,20 @@
# Contact
## ContactAddress
**Namespace** : alphayax\freebox\api\v3\services\Call\Contact
### Public methods
# Overview
| Method | Description |
|---|---|
| `getFromId` | Get the address (with the given id) |
| `create` | Add an address |
| `delete` | Remove an address |
| `deleteFromId` | Remove an address (with the given id) |
| `update` | Update an address |
- [ContactNumber](Contact.md#ContactNumber)
- [ContactAddress](Contact.md#ContactAddress)
- [ContactUrl](Contact.md#ContactUrl)
- [ContactEmail](Contact.md#ContactEmail)
- [ContactEntry](Contact.md#ContactEntry)
## ContactEmail
**Namespace** : alphayax\freebox\api\v3\services\Call\Contact
### Public methods
| Method | Description |
|---|---|
| `getFromId` | Get the email contact (with the given id) |
| `create` | Create a new email contact |
| `delete` | Remove an email contact |
| `deleteFromId` | Remove an email contact (with the given id) |
| `update` | Update an email contact |
## ContactEntry
**Namespace** : alphayax\freebox\api\v3\services\Call\Contact
### Public methods
| Method | Description |
|---|---|
| `getAll` | List all contacts |
| `getFromId` | Get a specific contact entry |
| `create` | Add a contact entry |
| `update` | Update a contact entry |
| `delete` | Remove a contact entry |
| `deleteFromId` | remove a contact entry (with the specified id) |
| `getContactNumbersFromContactId` | Get all numbers associated to a given contact id |
| `getContactAddressesFromContactId` | Get all addresses associated to a given contact id |
| `getContactEmailsFromContactId` | Get all email addresses associated to a given contact id |
| `getContactUrlsFromContactId` | Get all URLs associated to a given contact id |
<a name="ContactNumber"></a>
## ContactNumber
**Namespace** : alphayax\freebox\api\v3\services\Call\Contact
**Class** : alphayax\freebox\api\v3\services\Call\Contact\ContactNumber
### Public methods
@ -63,9 +26,25 @@
| `deleteFromId` | Remove a contact number (with the specified id) |
| `update` | Update a contact number |
<a name="ContactAddress"></a>
## ContactAddress
**Class** : alphayax\freebox\api\v3\services\Call\Contact\ContactAddress
### Public methods
| Method | Description |
|---|---|
| `getFromId` | Get the address (with the given id) |
| `create` | Add an address |
| `delete` | Remove an address |
| `deleteFromId` | Remove an address (with the given id) |
| `update` | Update an address |
<a name="ContactUrl"></a>
## ContactUrl
**Namespace** : alphayax\freebox\api\v3\services\Call\Contact
**Class** : alphayax\freebox\api\v3\services\Call\Contact\ContactUrl
### Public methods
@ -76,3 +55,38 @@
| `delete` | Remove a contact url |
| `deleteFromId` | Remove a contact url (with the given id) |
| `update` | Update a contact url |
<a name="ContactEmail"></a>
## ContactEmail
**Class** : alphayax\freebox\api\v3\services\Call\Contact\ContactEmail
### Public methods
| Method | Description |
|---|---|
| `getFromId` | Get the email contact (with the given id) |
| `create` | Create a new email contact |
| `delete` | Remove an email contact |
| `deleteFromId` | Remove an email contact (with the given id) |
| `update` | Update an email contact |
<a name="ContactEntry"></a>
## ContactEntry
**Class** : alphayax\freebox\api\v3\services\Call\Contact\ContactEntry
### Public methods
| Method | Description |
|---|---|
| `getAll` | List all contacts |
| `getFromId` | Get a specific contact entry |
| `create` | Add a contact entry |
| `update` | Update a contact entry |
| `delete` | Remove a contact entry |
| `deleteFromId` | Remove a contact entry (with the specified id) |
| `getContactNumbersFromContactId` | Get all numbers associated to a given contact id |
| `getContactAddressesFromContactId` | Get all addresses associated to a given contact id |
| `getContactEmailsFromContactId` | Get all email addresses associated to a given contact id |
| `getContactUrlsFromContactId` | Get all URLs associated to a given contact id |

View File

@ -0,0 +1,92 @@
# FileSystem
**Namespace** : alphayax\freebox\api\v3\services\FileSystem
# Overview
- [FileSystemListing](FileSystem.md#FileSystemListing)
- [FileSharingLink](FileSystem.md#FileSharingLink)
- [FileSystemTask](FileSystem.md#FileSystemTask)
- [FileUpload](FileSystem.md#FileUpload)
- [FileSystemOperation](FileSystem.md#FileSystemOperation)
<a name="FileSystemListing"></a>
## FileSystemListing
**Class** : alphayax\freebox\api\v3\services\FileSystem\FileSystemListing
### Public methods
| Method | Description |
|---|---|
| `getFilesFromDirectory` | Get all files in a given directory |
| `getFileInformation` | Get file information |
<a name="FileSharingLink"></a>
## FileSharingLink
**Class** : alphayax\freebox\api\v3\services\FileSystem\FileSharingLink
### Public methods
| Method | Description |
|---|---|
| `getAll` | Retrieve all File Sharing links |
| `getFromToken` | Get a file sharing link from his token identifier |
| `deleteFromToken` | Delete a File Sharing link for his token identifier Deletes the ShareLink task with the given token, if the task was running, stop it. |
| `create` | Create a File Sharing link |
<a name="FileSystemTask"></a>
## FileSystemTask
**Class** : alphayax\freebox\api\v3\services\FileSystem\FileSystemTask
### Public methods
| Method | Description |
|---|---|
| `getAllTasks` | Retrieve all FS tasks |
| `getTaskById` | Retrieve a FS task with the specified id |
| `deleteTask` | Delete a FS task |
| `deleteTaskById` | Delete a FS task with the specified id |
| `updateTask` | Update a FS task |
<a name="FileUpload"></a>
## FileUpload
**Class** : alphayax\freebox\api\v3\services\FileSystem\FileUpload
### Public methods
| Method | Description |
|---|---|
| `createAuthorization` | Create a file upload authorization |
| `uploadFile` | Send the content of the FileUpload task |
| `getAll` | Get the list of uploads |
| `getFromId` | Track an upload status |
| `cancelFromId` | Cancel the given FileUpload closing the connection The upload status must be in_progress |
| `deleteFromId` | Delete the given FileUpload closing the connection if needed |
| `cleanTerminated` | Deletes all the FileUpload not in_progress |
<a name="FileSystemOperation"></a>
## FileSystemOperation
**Class** : alphayax\freebox\api\v3\services\FileSystem\FileSystemOperation
### Public methods
| Method | Description |
|---|---|
| `move` | Move files |
| `copy` | Copy files |
| `remove` | Delete files |
| `cat` | Concatenate files (Miaw ^^) |
| `archive` | Create an archive |
| `extract` | Extract an archive |
| `repair` | Repair files from a .par2 |
| `computeHash` | Hash a file. This operation can take some time. To get the hash value, the returned task must have succeed and be in the state “done”. |
| `getHashValue` | Get the hash value To get the hash, the task must have succeed and be in the state “done”. |
| `createDirectory` | Create a directory Contrary to other file system tasks, this operation is done synchronously. |
| `rename` | Rename a file/folder Contrary to other file system tasks, this operation is done synchronously. |
| `download` | Download a file from the freebox server (return the file content) |

View File

@ -0,0 +1,39 @@
# ParentalControl
**Namespace** : alphayax\freebox\api\v3\services\ParentalControl
# Overview
- [FilterPlanning](ParentalControl.md#FilterPlanning)
- [Filter](ParentalControl.md#Filter)
<a name="FilterPlanning"></a>
## FilterPlanning
**Class** : alphayax\freebox\api\v3\services\ParentalControl\FilterPlanning
### Public methods
| Method | Description |
|---|---|
| `getFromFilterId` | Get the filer planning associated with the given filter id |
| `setFromFilterId` | Update the filer planning associated with the given filter id |
<a name="Filter"></a>
## Filter
**Class** : alphayax\freebox\api\v3\services\ParentalControl\Filter
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Return the current Filter configuration |
| `setConfiguration` | Update the filter configuration |
| `getAll` | Get the list of all filters |
| `getFromId` | Get a specific filter from id |
| `update` | Update a filter |
| `delete` | Delete a filter |
| `deleteFromId` | Delete a filter with the specified id |
| `add` | Add a new filter |

19
docs/services/RRD/RRD.md Normal file
View File

@ -0,0 +1,19 @@
# RRD
**Namespace** : alphayax\freebox\api\v3\services\RRD
# Overview
- [Fetch](RRD.md#Fetch)
<a name="Fetch"></a>
## Fetch
**Class** : alphayax\freebox\api\v3\services\RRD\Fetch
### Public methods
| Method | Description |
|---|---|
| `getStats` | Return Freebox information & statistics |

View File

@ -0,0 +1,36 @@
# Storage
**Namespace** : alphayax\freebox\api\v3\services\Storage
# Overview
- [Disk](Storage.md#Disk)
- [Partition](Storage.md#Partition)
<a name="Disk"></a>
## Disk
**Class** : alphayax\freebox\api\v3\services\Storage\Disk
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of disks |
| `getFromId` | Get a given disk info |
| `update` | Update a disk state |
| `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. |
<a name="Partition"></a>
## Partition
**Class** : alphayax\freebox\api\v3\services\Storage\Partition
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of partitions |
| `getFromId` | Get a given partition info |
| `check` | Checks the partition with the given id *NOTE* once started you can monitor the fsck process getting the partition information |

View File

@ -1,11 +1,47 @@
# Connection
- [DynDns](./config/Connection/DynDns/DynDns.md)
**Namespace** : alphayax\freebox\api\v3\services\config\Connection
# Overview
- [DynDns](./DynDns/DynDns.md)
- [DynDns](DynDns/DynDns.md#DynDns)
- [NoIP](DynDns/DynDns.md#NoIP)
- [Ovh](DynDns/DynDns.md#Ovh)
- [DynDns](Connection.md#DynDns)
- [Ftth](Connection.md#Ftth)
- [Connection](Connection.md#Connection)
- [Xdsl](Connection.md#Xdsl)
<a name="DynDns"></a>
## DynDns
**Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current DDns status |
| `getConfig` | Get the current DDns Configuration |
| `setConfig` | Set the DDns Configuration |
<a name="Ftth"></a>
## Ftth
**Class** : alphayax\freebox\api\v3\services\config\Connection\Ftth
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current Connection status |
<a name="Connection"></a>
## Connection
**Namespace** : alphayax\freebox\api\v3\services\config\Connection
**Class** : alphayax\freebox\api\v3\services\config\Connection\Connection
### Public methods
@ -17,34 +53,13 @@
| `getIPv6Configuration` | Get the current IPv6 Connection configuration |
| `setIPv6Configuration` | Update the IPv6 Connection configuration |
## DynDns
**Namespace** : alphayax\freebox\api\v3\services\config\Connection
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current DDns status |
| `getConfig` | Get the current DDns Configuration |
| `setConfig` | Set the DDns Configuration |
## Ftth
**Namespace** : alphayax\freebox\api\v3\services\config\Connection
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current Connection status |
<a name="Xdsl"></a>
## Xdsl
**Namespace** : alphayax\freebox\api\v3\services\config\Connection
**Class** : alphayax\freebox\api\v3\services\config\Connection\Xdsl
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current Connection status |
| `getStatus` | Get the current XDSL Connection status |

View File

@ -1,10 +1,18 @@
# DynDns
**Namespace** : alphayax\freebox\api\v3\services\config\Connection\DynDns
# Overview
- [DynDns](DynDns.md#DynDns)
- [NoIP](DynDns.md#NoIP)
- [Ovh](DynDns.md#Ovh)
<a name="DynDns"></a>
## DynDns
**Namespace** : alphayax\freebox\api\v3\services\config\Connection\DynDns
**Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns\DynDns
### Public methods
@ -14,9 +22,10 @@
| `getConfig` | |
| `setConfig` | |
<a name="NoIP"></a>
## NoIP
**Namespace** : alphayax\freebox\api\v3\services\config\Connection\DynDns
**Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns\NoIP
### Public methods
@ -26,9 +35,10 @@
| `getConfig` | |
| `setConfig` | |
<a name="Ovh"></a>
## Ovh
**Namespace** : alphayax\freebox\api\v3\services\config\Connection\DynDns
**Class** : alphayax\freebox\api\v3\services\config\Connection\DynDns\Ovh
### Public methods

View File

@ -0,0 +1,37 @@
# LAN
**Namespace** : alphayax\freebox\api\v3\services\config\LAN
# Overview
- [LAN](LAN.md#LAN)
- [Browser](LAN.md#Browser)
<a name="LAN"></a>
## LAN
**Class** : alphayax\freebox\api\v3\services\config\LAN\LAN
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current LAN configuration |
| `setConfiguration` | Update the LAN configuration |
<a name="Browser"></a>
## Browser
**Class** : alphayax\freebox\api\v3\services\config\LAN\Browser
### Public methods
| Method | Description |
|---|---|
| `getBrowsableInterfaces` | Get all Lan interfaces |
| `getHostsFromInterface` | Get the LanHosts of the specified interface |
| `getHostsFromInterfaceName` | Get the LanHosts of the specified interface name |
| `getHostFromId` | Get a specific LanHost |
| `updateHostFromInterfaceId` | Update a LanHost |
| `wakeOnLan` | Send Wake ok Lan packet to an host |

View File

@ -1,33 +1,18 @@
# NAT
## DMZ
**Namespace** : alphayax\freebox\api\v3\services\config\NAT
### Public methods
# Overview
| Method | Description |
|---|---|
| `getConfiguration` | Get the current Dmz configuration |
| `setConfiguration` | Update the current Dmz configuration |
- [PortForwarding](NAT.md#PortForwarding)
- [DMZ](NAT.md#DMZ)
- [IncomingPort](NAT.md#IncomingPort)
## IncomingPort
**Namespace** : alphayax\freebox\api\v3\services\config\NAT
### Public methods
| Method | Description |
|---|---|
| `getAll` | Getting the list of incoming ports |
| `getById` | Getting a specific incoming port |
| `update` | Updating an incoming port |
<a name="PortForwarding"></a>
## PortForwarding
**Namespace** : alphayax\freebox\api\v3\services\config\NAT
**Class** : alphayax\freebox\api\v3\services\config\NAT\PortForwarding
### Public methods
@ -38,4 +23,29 @@
| `update` | Update a specific port forwarding |
| `add` | Add a port forwarding |
| `delete` | Delete a port forwarding |
| `deleteById` | Delete a port forwarding |
| `deleteById` | Delete a port forwarding with the specified id |
<a name="DMZ"></a>
## DMZ
**Class** : alphayax\freebox\api\v3\services\config\NAT\DMZ
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current Dmz configuration |
| `setConfiguration` | Update the current Dmz configuration |
<a name="IncomingPort"></a>
## IncomingPort
**Class** : alphayax\freebox\api\v3\services\config\NAT\IncomingPort
### Public methods
| Method | Description |
|---|---|
| `getAll` | Getting the list of incoming ports |
| `getFromId` | Getting a specific incoming port |
| `update` | Updating an incoming port |

View File

@ -1,10 +1,17 @@
# NetworkShare
**Namespace** : alphayax\freebox\api\v3\services\config\NetworkShare
# Overview
- [Afp](NetworkShare.md#Afp)
- [Samba](NetworkShare.md#Samba)
<a name="Afp"></a>
## Afp
**Namespace** : alphayax\freebox\api\v3\services\config\NetworkShare
**Class** : alphayax\freebox\api\v3\services\config\NetworkShare\Afp
### Public methods
@ -13,9 +20,10 @@
| `getConfiguration` | Get the current Afp configuration |
| `setConfiguration` | Update the Afp configuration |
<a name="Samba"></a>
## Samba
**Namespace** : alphayax\freebox\api\v3\services\config\NetworkShare
**Class** : alphayax\freebox\api\v3\services\config\NetworkShare\Samba
### Public methods

View File

@ -1,10 +1,40 @@
# SwitchPort
**Namespace** : alphayax\freebox\api\v3\services\config\SwitchPort
# Overview
- [Status](SwitchPort.md#Status)
- [Stats](SwitchPort.md#Stats)
- [Config](SwitchPort.md#Config)
<a name="Status"></a>
## Status
**Class** : alphayax\freebox\api\v3\services\config\SwitchPort\Status
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current switch status |
<a name="Stats"></a>
## Stats
**Class** : alphayax\freebox\api\v3\services\config\SwitchPort\Stats
### Public methods
| Method | Description |
|---|---|
| `getFromPortId` | Get a port configuration |
<a name="Config"></a>
## Config
**Namespace** : alphayax\freebox\api\v3\services\config\SwitchPort
**Class** : alphayax\freebox\api\v3\services\config\SwitchPort\Config
### Public methods
@ -12,23 +42,3 @@
|---|---|
| `getFromPortId` | Get a port configuration |
| `update` | Update a port configuration |
## Stats
**Namespace** : alphayax\freebox\api\v3\services\config\SwitchPort
### Public methods
| Method | Description |
|---|---|
| `getFromPortId` | Get a port configuration |
## Status
**Namespace** : alphayax\freebox\api\v3\services\config\SwitchPort
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the current switch status |

View File

@ -1,21 +1,17 @@
# UPnP
## AV
**Namespace** : alphayax\freebox\api\v3\services\config\UPnP
### Public methods
# Overview
| Method | Description |
|---|---|
| `getConfiguration` | Get the current UPnP AV configuration |
| `setConfiguration` | Update the UPnP AV configuration |
- [IGD](UPnP.md#IGD)
- [AV](UPnP.md#AV)
<a name="IGD"></a>
## IGD
**Namespace** : alphayax\freebox\api\v3\services\config\UPnP
**Class** : alphayax\freebox\api\v3\services\config\UPnP\IGD
### Public methods
@ -25,3 +21,15 @@
| `setConfiguration` | Update the UPnP AV configuration |
| `getRedirections` | Get the list of current redirection |
| `deleteRedirectionFromId` | Delete a redirection |
<a name="AV"></a>
## AV
**Class** : alphayax\freebox\api\v3\services\config\UPnP\AV
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current UPnP AV configuration |
| `setConfiguration` | Update the UPnP AV configuration |

View File

@ -1,10 +1,29 @@
# Client
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Client
# Overview
- [Status](Client.md#Status)
- [Config](Client.md#Config)
<a name="Status"></a>
## Status
**Class** : alphayax\freebox\api\v3\services\config\VPN\Client\Status
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the VPN client status |
| `getLogs` | Get the VPN client Logs |
<a name="Config"></a>
## Config
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Client
**Class** : alphayax\freebox\api\v3\services\config\VPN\Client\Config
### Public methods
@ -16,14 +35,3 @@
| `delete` | |
| `deleteFromId` | |
| `update` | |
## Status
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Client
### Public methods
| Method | Description |
|---|---|
| `getStatus` | Get the VPN client status |
| `getLogs` | Get the VPN client Logs |

View File

@ -1,42 +1,19 @@
# Server
## Config
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Server
### Public methods
# Overview
| Method | Description |
|---|---|
| `getConfigurationFromId` | Get a VPN config |
| `setConfiguration` | Update the VPN configuration |
- [User](Server.md#User)
- [IpPool](Server.md#IpPool)
- [Connection](Server.md#Connection)
- [Config](Server.md#Config)
## Connection
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Server
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of connections |
| `closeFromId` | Close a given connection |
## IpPool
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Server
### Public methods
| Method | Description |
|---|---|
| `getReservations` | Get the VPN server IP pool reservations |
<a name="User"></a>
## User
**Namespace** : alphayax\freebox\api\v3\services\config\VPN\Server
**Class** : alphayax\freebox\api\v3\services\config\VPN\Server\User
### Public methods
@ -46,6 +23,41 @@
| `getFromLogin` | Gets the VPNUser with the given login |
| `add` | Creates a new VPNUser |
| `delete` | Deletes the VPNUser |
| `deleteFromLogin` | Deletes the VPNUser |
| `deleteFromLogin` | Deletes the VPNUser with the given id |
| `update` | Update a VPN Use |
| `getConfigurationFile` | |
| `getConfigurationFile` | Generate a new configuration file & download it |
<a name="IpPool"></a>
## IpPool
**Class** : alphayax\freebox\api\v3\services\config\VPN\Server\IpPool
### Public methods
| Method | Description |
|---|---|
| `getReservations` | Get the VPN server IP pool reservations |
<a name="Connection"></a>
## Connection
**Class** : alphayax\freebox\api\v3\services\config\VPN\Server\Connection
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of connections |
| `closeFromId` | Close a given connection |
<a name="Config"></a>
## Config
**Class** : alphayax\freebox\api\v3\services\config\VPN\Server\Config
### Public methods
| Method | Description |
|---|---|
| `getConfigurationFromId` | Get a VPN config |
| `setConfiguration` | Update the VPN configuration |

View File

@ -0,0 +1,15 @@
# VPN
**Namespace** : alphayax\freebox\api\v3\services\config\VPN
# Overview
- [Server](./Server/Server.md)
- [User](Server/Server.md#User)
- [IpPool](Server/Server.md#IpPool)
- [Connection](Server/Server.md#Connection)
- [Config](Server/Server.md#Config)
- [Client](./Client/Client.md)
- [Status](Client/Client.md#Status)
- [Config](Client/Client.md#Config)

View File

@ -0,0 +1,84 @@
# WiFi
**Namespace** : alphayax\freebox\api\v3\services\config\WiFi
# Overview
- [Planning](WiFi.md#Planning)
- [MacFilter](WiFi.md#MacFilter)
- [Config](WiFi.md#Config)
- [Bss](WiFi.md#Bss)
- [AccessPoint](WiFi.md#AccessPoint)
<a name="Planning"></a>
## Planning
**Class** : alphayax\freebox\api\v3\services\config\WiFi\Planning
### Public methods
| Method | Description |
|---|---|
| `getPlanning` | Get the wifi planning |
| `update` | Update the wifi planning |
<a name="MacFilter"></a>
## MacFilter
**Class** : alphayax\freebox\api\v3\services\config\WiFi\MacFilter
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get all MacFilters |
| `getFromId` | Get a specific MacFilter |
| `update` | Update a MacFilter |
| `delete` | Delete a MacFilter |
| `deleteFromId` | Delete a MacFilter with the specified id |
| `add` | Add a new MacFilter |
<a name="Config"></a>
## Config
**Class** : alphayax\freebox\api\v3\services\config\WiFi\Config
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the global wifi configuration |
| `setConfiguration` | Update the global wifi configuration |
| `resetConfiguration` | Reset Wifi to default configuration |
<a name="Bss"></a>
## Bss
**Class** : alphayax\freebox\api\v3\services\config\WiFi\Bss
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of Freebox BSS |
| `getFromId` | Get a specific BSS |
| `update` | Update a BSS |
<a name="AccessPoint"></a>
## AccessPoint
**Class** : alphayax\freebox\api\v3\services\config\WiFi\AccessPoint
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get all Access Points |
| `getFromId` | Get a specific Access Point |
| `getAllowedCombFromId` | To be able to allow user to pick a valid channel combination for a given AP you should use the following api to retrieve the list of allowed channel combination. |
| `getStationsFromId` | To be able to allow user to pick a valid channel combination for a given AP you should use the following api to retrieve the list of allowed channel combination. |
| `update` | Update an Access Point |
| `getNeighborsFromId` | Get the list of Neighbor seen by the AP |
| `refreshNeighborsScan` | WARNING during the scan the AP will be unavailable. Therefore, you should ask for user confirmation prior to launching a scan. Once launched you should wait until the ap state comes back from scanning to get updated info. |
| `getChannelUsageFromId` | List Wi-Fi channels usage |

View File

@ -0,0 +1,114 @@
# config
**Namespace** : alphayax\freebox\api\v3\services\config
# Overview
- [LAN](./LAN/LAN.md)
- [LAN](LAN/LAN.md#LAN)
- [Browser](LAN/LAN.md#Browser)
- [SwitchPort](./SwitchPort/SwitchPort.md)
- [Status](SwitchPort/SwitchPort.md#Status)
- [Stats](SwitchPort/SwitchPort.md#Stats)
- [Config](SwitchPort/SwitchPort.md#Config)
- [VPN](./VPN/VPN.md)
- [Server](./VPN/Server/Server.md)
- [User](VPN/Server/Server.md#User)
- [IpPool](VPN/Server/Server.md#IpPool)
- [Connection](VPN/Server/Server.md#Connection)
- [Config](VPN/Server/Server.md#Config)
- [Client](./VPN/Client/Client.md)
- [Status](VPN/Client/Client.md#Status)
- [Config](VPN/Client/Client.md#Config)
- [UPnP](./UPnP/UPnP.md)
- [IGD](UPnP/UPnP.md#IGD)
- [AV](UPnP/UPnP.md#AV)
- [NetworkShare](./NetworkShare/NetworkShare.md)
- [Afp](NetworkShare/NetworkShare.md#Afp)
- [Samba](NetworkShare/NetworkShare.md#Samba)
- [WiFi](./WiFi/WiFi.md)
- [Planning](WiFi/WiFi.md#Planning)
- [MacFilter](WiFi/WiFi.md#MacFilter)
- [Config](WiFi/WiFi.md#Config)
- [Bss](WiFi/WiFi.md#Bss)
- [AccessPoint](WiFi/WiFi.md#AccessPoint)
- [Connection](./Connection/Connection.md)
- [DynDns](./Connection/DynDns/DynDns.md)
- [DynDns](Connection/DynDns/DynDns.md#DynDns)
- [NoIP](Connection/DynDns/DynDns.md#NoIP)
- [Ovh](Connection/DynDns/DynDns.md#Ovh)
- [DynDns](Connection/Connection.md#DynDns)
- [Ftth](Connection/Connection.md#Ftth)
- [Connection](Connection/Connection.md#Connection)
- [Xdsl](Connection/Connection.md#Xdsl)
- [NAT](./NAT/NAT.md)
- [PortForwarding](NAT/NAT.md#PortForwarding)
- [DMZ](NAT/NAT.md#DMZ)
- [IncomingPort](NAT/NAT.md#IncomingPort)
- [FTP](config.md#FTP)
- [System](config.md#System)
- [LCD](config.md#LCD)
- [DHCP](config.md#DHCP)
- [Freeplug](config.md#Freeplug)
<a name="FTP"></a>
## FTP
**Class** : alphayax\freebox\api\v3\services\config\FTP
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current FTP configuration |
| `setConfiguration` | |
<a name="System"></a>
## System
**Class** : alphayax\freebox\api\v3\services\config\System
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current system info |
| `reboot` | Reboot the Freebox |
<a name="LCD"></a>
## LCD
**Class** : alphayax\freebox\api\v3\services\config\LCD
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current LCD configuration |
| `setConfiguration` | Update the LCD configuration |
<a name="DHCP"></a>
## DHCP
**Class** : alphayax\freebox\api\v3\services\config\DHCP
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current DHCP configuration |
| `setConfiguration` | Update the DHCP configuration |
<a name="Freeplug"></a>
## Freeplug
**Class** : alphayax\freebox\api\v3\services\config\Freeplug
### Public methods
| Method | Description |
|---|---|
| `getNetworks` | Get the freeplug networks information |
| `getFromId` | Get a particular Freeplug information |
| `resetFromId` | Reset a Freeplug |

View File

@ -0,0 +1,108 @@
# download
**Namespace** : alphayax\freebox\api\v3\services\download
# Overview
- [BlackList](download.md#BlackList)
- [Tracker](download.md#Tracker)
- [Feed](download.md#Feed)
- [Configuration](download.md#Configuration)
- [Peer](download.md#Peer)
- [Download](download.md#Download)
<a name="BlackList"></a>
## BlackList
**Class** : alphayax\freebox\api\v3\services\download\BlackList
### Public methods
| Method | Description |
|---|---|
| `getAllFromDownloadTaskId` | Get the list of blacklist entries for a given download Attempting to call this method on a download other than bittorent will fail. |
| `emptyBlackListFromDownloadId` | Empty the blacklist for a given download This call allow to remove all global entries, and entries related to the given download |
| `removeBlackListEntry` | Delete a particular blacklist entry |
| `addBlackListEntry` | Add a blacklist entry |
<a name="Tracker"></a>
## Tracker
**Class** : alphayax\freebox\api\v3\services\download\Tracker
### Public methods
| Method | Description |
|---|---|
| `getAll` | Each torrent Download task has one or more DownloadTracker. Each tracker is identified by its announce URL. |
| `add` | Add a new tracker Attempting to call this method on a download other than bittorent will fail |
| `remove` | Remove a tracker Attempting to call this method on a download other than bittorent will fail |
| `update` | Update a tracker Attempting to call this method on a download other than bittorent will fail |
<a name="Feed"></a>
## Feed
**Class** : alphayax\freebox\api\v3\services\download\Feed
### Public methods
| Method | Description |
|---|---|
| `getAllFeeds` | Get the list of all download Feeds |
| `getFeedFromId` | Gets the DownloadFeed with the given id |
| `addFeed` | Add a Download Feed |
| `removeFeed` | Delete a Download Feed |
| `updateFeed` | Update a Download Feed |
| `refreshFeed` | Remotely fetches the RSS feed and updates it. Note that if the remote feed specifies a TTL, trying to update before the ttl will result in feed_is_recent error |
| `refreshFeeds` | Remotely fetches the RSS feed and updates it. Note that if the remote feed specifies a TTL, trying to update before the ttl will result in feed_is_recent error |
| `getFeedItems` | Returns the collection of all DownloadFeedItems for a given DownloadFeed |
| `updateFeedItem` | Returns the collection of all DownloadFeedItems for a given DownloadFeed |
| `downloadFeedItem` | Download the specified feed item |
| `markFeedAsRead` | Mark the specified feed id as "Read" |
<a name="Configuration"></a>
## Configuration
**Class** : alphayax\freebox\api\v3\services\download\Configuration
### Public methods
| Method | Description |
|---|---|
| `getConfiguration` | Get the current Download configuration |
| `setConfiguration` | Update the Download configuration |
| `updateThrottlingMode` | You can force the throttling mode using this method. You can use any of the throttling modes defined in DlThrottlingConfig. |
<a name="Peer"></a>
## Peer
**Class** : alphayax\freebox\api\v3\services\download\Peer
### Public methods
| Method | Description |
|---|---|
| `getAll` | Get the list of peers for a given Download Attempting to call this method on a download other than bittorent will fail |
<a name="Download"></a>
## Download
**Class** : alphayax\freebox\api\v3\services\download\Download
### Public methods
| Method | Description |
|---|---|
| `getAll` | Returns the collection of all Download tasks |
| `getFromId` | Returns the Download task with the given id |
| `getLogFromId` | Get the current system info |
| `deleteFromId` | Delete a download task (conserve data) |
| `eraseFromId` | Delete a download task (erase data) |
| `update` | Update a download task |
| `addFromUrl` | Add a download task with the specified URL |
| `addFromUrls` | Add a download task with all the specified URLs |
| `addFromFile` | Add a download task with the specified file (torrent, nzb...) |
| `getStats` | Returns the Download task with the given id |
| `getFilesFromId` | Returns the downloaded files with the given task id |
| `updateFilePriority` | Update a download priority |

View File

@ -0,0 +1,37 @@
# login
**Namespace** : alphayax\freebox\api\v3\services\login
# Overview
- [Session](login.md#Session)
- [Authorize](login.md#Authorize)
<a name="Session"></a>
## Session
**Class** : alphayax\freebox\api\v3\services\login\Session
### Public methods
| Method | Description |
|---|---|
| `askLoginStatus` | |
| `createSession` | |
| `getSessionToken` | |
| `getPermissions` | |
<a name="Authorize"></a>
## Authorize
**Class** : alphayax\freebox\api\v3\services\login\Authorize
### Public methods
| Method | Description |
|---|---|
| `askAuthorization` | Contact the freebox and ask for App auth |
| `getAuthorizationStatus` | |
| `getStatus` | |
| `getAppToken` | |

101
docs/services/services.md Normal file
View File

@ -0,0 +1,101 @@
# services
**Namespace** : alphayax\freebox\api\v3\services
# Overview
- [Storage](./Storage/Storage.md)
- [Disk](Storage/Storage.md#Disk)
- [Partition](Storage/Storage.md#Partition)
- [config](./config/config.md)
- [LAN](./config/LAN/LAN.md)
- [LAN](config/LAN/LAN.md#LAN)
- [Browser](config/LAN/LAN.md#Browser)
- [SwitchPort](./config/SwitchPort/SwitchPort.md)
- [Status](config/SwitchPort/SwitchPort.md#Status)
- [Stats](config/SwitchPort/SwitchPort.md#Stats)
- [Config](config/SwitchPort/SwitchPort.md#Config)
- [VPN](./config/VPN/VPN.md)
- [Server](./config/VPN/Server/Server.md)
- [User](config/VPN/Server/Server.md#User)
- [IpPool](config/VPN/Server/Server.md#IpPool)
- [Connection](config/VPN/Server/Server.md#Connection)
- [Config](config/VPN/Server/Server.md#Config)
- [Client](./config/VPN/Client/Client.md)
- [Status](config/VPN/Client/Client.md#Status)
- [Config](config/VPN/Client/Client.md#Config)
- [UPnP](./config/UPnP/UPnP.md)
- [IGD](config/UPnP/UPnP.md#IGD)
- [AV](config/UPnP/UPnP.md#AV)
- [NetworkShare](./config/NetworkShare/NetworkShare.md)
- [Afp](config/NetworkShare/NetworkShare.md#Afp)
- [Samba](config/NetworkShare/NetworkShare.md#Samba)
- [WiFi](./config/WiFi/WiFi.md)
- [Planning](config/WiFi/WiFi.md#Planning)
- [MacFilter](config/WiFi/WiFi.md#MacFilter)
- [Config](config/WiFi/WiFi.md#Config)
- [Bss](config/WiFi/WiFi.md#Bss)
- [AccessPoint](config/WiFi/WiFi.md#AccessPoint)
- [Connection](./config/Connection/Connection.md)
- [DynDns](./config/Connection/DynDns/DynDns.md)
- [DynDns](config/Connection/DynDns/DynDns.md#DynDns)
- [NoIP](config/Connection/DynDns/DynDns.md#NoIP)
- [Ovh](config/Connection/DynDns/DynDns.md#Ovh)
- [DynDns](config/Connection/Connection.md#DynDns)
- [Ftth](config/Connection/Connection.md#Ftth)
- [Connection](config/Connection/Connection.md#Connection)
- [Xdsl](config/Connection/Connection.md#Xdsl)
- [NAT](./config/NAT/NAT.md)
- [PortForwarding](config/NAT/NAT.md#PortForwarding)
- [DMZ](config/NAT/NAT.md#DMZ)
- [IncomingPort](config/NAT/NAT.md#IncomingPort)
- [FTP](config/config.md#FTP)
- [System](config/config.md#System)
- [LCD](config/config.md#LCD)
- [DHCP](config/config.md#DHCP)
- [Freeplug](config/config.md#Freeplug)
- [Call](./Call/Call.md)
- [Contact](./Call/Contact/Contact.md)
- [ContactNumber](Call/Contact/Contact.md#ContactNumber)
- [ContactAddress](Call/Contact/Contact.md#ContactAddress)
- [ContactUrl](Call/Contact/Contact.md#ContactUrl)
- [ContactEmail](Call/Contact/Contact.md#ContactEmail)
- [ContactEntry](Call/Contact/Contact.md#ContactEntry)
- [CallEntry](Call/Call.md#CallEntry)
- [AirMedia](./AirMedia/AirMedia.md)
- [AirMediaReceiver](AirMedia/AirMedia.md#AirMediaReceiver)
- [Config](AirMedia/AirMedia.md#Config)
- [ParentalControl](./ParentalControl/ParentalControl.md)
- [FilterPlanning](ParentalControl/ParentalControl.md#FilterPlanning)
- [Filter](ParentalControl/ParentalControl.md#Filter)
- [RRD](./RRD/RRD.md)
- [Fetch](RRD/RRD.md#Fetch)
- [login](./login/login.md)
- [Session](login/login.md#Session)
- [Authorize](login/login.md#Authorize)
- [FileSystem](./FileSystem/FileSystem.md)
- [FileSystemListing](FileSystem/FileSystem.md#FileSystemListing)
- [FileSharingLink](FileSystem/FileSystem.md#FileSharingLink)
- [FileSystemTask](FileSystem/FileSystem.md#FileSystemTask)
- [FileUpload](FileSystem/FileSystem.md#FileUpload)
- [FileSystemOperation](FileSystem/FileSystem.md#FileSystemOperation)
- [download](./download/download.md)
- [BlackList](download/download.md#BlackList)
- [Tracker](download/download.md#Tracker)
- [Feed](download/download.md#Feed)
- [Configuration](download/download.md#Configuration)
- [Peer](download/download.md#Peer)
- [Download](download/download.md#Download)
- [ApiVersion](services.md#ApiVersion)
<a name="ApiVersion"></a>
## ApiVersion
**Class** : alphayax\freebox\api\v3\services\ApiVersion
### Public methods
| Method | Description |
|---|---|
| `getApiVersion` | Return a mapping of information about the api |

View File

@ -11,14 +11,12 @@ $App->openSession();
/// Scan files in root
$FSListService = new \alphayax\freebox\api\v3\services\FileSystem\FileSystemListing( $App);
$FilesInRoot = $FSListService->getFilesFromDirectory( '/');
foreach( $FilesInRoot as $fileInfo){
echo '- '. $fileInfo->getPath() . PHP_EOL;
}
print_r( $FilesInRoot);
/// Get a file information (Will throw an exception if file does not exists)
try {
$VideoFile = $FSListService->getFileInformation( '/Disque dur/Téléchargements/The.100.S03E14.FASTSUB.VOSTFR.1080p.HDTV.x264.AAC-GOBO2S/The.100.S03E14.FASTSUB.VOSTFR.1080p.HDTV.x264.AAC-GOBO2S.mkv');
var_dump( $VideoFile);
$VideoFile = $FSListService->getFileInformation( '/Disque dur/Téléchargements/');
print_r( $VideoFile);
} catch (Exception $e){
echo $e->getMessage();
}

View File

@ -0,0 +1,16 @@
<?php
/// Require Composer AutoLoader
require_once '../../vendor/autoload.php';
/// Define our application
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.os', 'AYX Freebox OS', '1.0.0');
/// Begin association (go to the Freebox Player led display)
echo "Begin association" . PHP_EOL;
$App->authorize();
$App->openSession();
echo "Generated app_token : ". $App->getAppToken() . PHP_EOL;

View File

@ -10,5 +10,5 @@ $App->openSession();
// PortForwarding
$toto = new \alphayax\freebox\api\v3\services\config\NAT\IncomingPort( $App);
$a = $toto->getById('http');
$a = $toto->getFromId('http');
var_dump( $a);

View File

@ -12,7 +12,7 @@ $App->openSession();
$DownloadService = new \alphayax\freebox\api\v3\services\download\Download( $App);
$Downloads = $DownloadService->getAll();
print_r( $Downloads);
/*
/// Trackers
$TrackerService = new \alphayax\freebox\api\v3\services\download\Tracker( $App);
$Trackers = $TrackerService->getAll( $Downloads[1]->getId());
@ -22,7 +22,7 @@ print_r( $Trackers);
$PeerService = new \alphayax\freebox\api\v3\services\download\Peer( $App);
$Peers = $PeerService->getAll( $Downloads[0]->getId());
print_r( $Peers);
*/
$BLService = new \alphayax\freebox\api\v3\services\download\BlackList( $App);
$BLEntries = $BLService->getAllFromDownloadTaskId( $Downloads[0]->getId());

View File

@ -1,5 +1,5 @@
{
"rss": "https:\/\/www.nyaa.se\/?page=rss&user=175467",
"pattern": "\/One_Piece.*HD.*mp4\/",
"last_date": 1465246874
"last_date": 1465755839
}

View File

@ -1,5 +1,4 @@
<?php
use alphayax\utils\cli\IO;
/// Require Composer AutoLoader
require_once '../../../vendor/autoload.php';
@ -23,7 +22,7 @@ foreach( $config_rfi_s as $config_rfi){
* @return array
*/
function checkRSS( $config, $App){
IO::stdout( "Scan RSS {$config['rss']} for pattern {$config['pattern']}", 0, true, IO::COLOR_YELLOW);
echo "Scan RSS {$config['rss']} for pattern {$config['pattern']}" . PHP_EOL;
$rss = simplexml_load_file( $config['rss']);
foreach( $rss->xpath('//item') as $item){
$title = (string) $item->xpath('title')[0];
@ -37,7 +36,7 @@ function checkRSS( $config, $App){
$Downloads = new \alphayax\freebox\api\v3\services\download\Download( $App);
$Downloads->addFromUrl( $link);
IO::stdout( "Add download $title ($desc)", 0, true, IO::COLOR_GREEN);
echo "Add download $title ($desc)" . PHP_EOL;
}
}
}

13
exemple/permissions.php Normal file
View File

@ -0,0 +1,13 @@
<?php
/// Require Composer AutoLoader
require_once '../vendor/autoload.php';
/// Define our application
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.permission', 'PHP API Example (permission)', '1.0.0');
$App->authorize();
$App->openSession();
$hasExplorerPermission = $App->hasPermission( \alphayax\freebox\api\v3\symbols\Permissions::EXPLORER);
var_dump( $hasExplorerPermission);

13
exemple/remote.php Normal file
View File

@ -0,0 +1,13 @@
<?php
/// Require Composer AutoLoader
require_once '../vendor/autoload.php';
/// Define our application
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.version', 'Freebox PHP API Example (Version)', '1.0.0');
$App->setFreeboxApiHost( 'https://xxx.freeboxos.fr:17105');
$App->setAppToken( 'xxxxxxxxxxxxxxxxxxxx');
$VersionService = new \alphayax\freebox\api\v3\services\ApiVersion( $App);
$version = $VersionService->getApiVersion();
print_r( $version);

11
exemple/version.php Normal file
View File

@ -0,0 +1,11 @@
<?php
/// Require Composer AutoLoader
require_once '../vendor/autoload.php';
/// Define our application
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.version', 'Freebox PHP API Example (Version)', '1.0.0');
$VersionService = new \alphayax\freebox\api\v3\services\ApiVersion( $App);
$version = $VersionService->getApiVersion();
print_r( $version);

View File

@ -0,0 +1,78 @@
<?php
namespace alphayax\freebox\Exception;
/**
* Class FreeboxException
* @package alphayax\freebox\Exception
*/
class FreeboxApiException extends \Exception {
/** @var string */
protected $apiMessage;
/** @var string */
protected $apiErrorCode;
/** @var string */
protected $apiRequest;
/** @var string */
protected $apiHost;
/**
* @return string
*/
public function getApiMessage() {
return $this->apiMessage;
}
/**
* @return string
*/
public function getApiErrorCode() {
return $this->apiErrorCode;
}
/**
* @return string
*/
public function getApiRequest() {
return $this->apiRequest;
}
/**
* @return string
*/
public function getApiHost() {
return $this->apiHost;
}
/**
* @param $message
*/
public function setApiMessage( $message) {
$this->apiMessage = $message;
}
/**
* @param $apiErrorCode
*/
public function setApiErrorCode( $apiErrorCode) {
$this->apiErrorCode = $apiErrorCode;
}
/**
* @param $apiRequest
*/
public function setApiRequest( $apiRequest) {
$this->apiRequest = $apiRequest;
}
/**
* @param $apiHost
*/
public function setApiHost( $apiHost) {
$this->apiHost = $apiHost;
}
}

View File

@ -1,43 +0,0 @@
<?php
namespace alphayax\freebox\api\v3;
use alphayax\freebox\utils;
/**
* Class freebox_service
*/
abstract class Service {
/** @var \alphayax\freebox\utils\Application */
protected $application;
/// Freebox API host URI
const API_HOST = 'http://mafreebox.freebox.fr';
/**
* Service constructor.
* @param \alphayax\freebox\utils\Application $application
*/
public function __construct( utils\Application $application){
$this->application = $application;
}
/**
* @param $service
* @return \alphayax\freebox\utils\rest\Rest
*/
protected function getService( $service){
return new utils\rest\Rest( static::API_HOST . $service);
}
/**
* @param string $service
* @param bool $isJson
* @param bool $returnAsArray
* @return utils\rest\RestAuth
*/
protected function getAuthService( $service, $isJson = true, $returnAsArray = true){
$rest = new utils\rest\RestAuth( static::API_HOST . $service, $isJson, $returnAsArray);
$rest->setSessionToken( $this->application->getSessionToken());
return $rest;
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\AirMedia;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class AirMediaConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\AirMedia;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class AirMediaReceiver

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\AirMedia;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class AirMediaReceiver

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Call;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class CallEntry

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Call;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ContactAddress
@ -164,4 +164,4 @@ class ContactAddress extends Model {
$this->country = $country;
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Call;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ContactEmail

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Call;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ContactEntry

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Call;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ContactNumber

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Call;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ContactUrl

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
class Config extends Model {
@ -146,4 +146,4 @@ class Config extends Model {
$this->allow_token_request = $allow_token_request;
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\DynDns;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Config

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\DynDns;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Status

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\Ftth;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Status

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\Ipv6;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Configuration
@ -66,4 +66,4 @@ class Configuration extends Model {
$this->delegations = $delegations;
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\Ipv6;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Delegation

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ConnectionStatus

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\Xdsl;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class XdslInfos

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\Xdsl;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class XdslStats

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Connection\Xdsl;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class XdslStatus

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DhcpConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class BlackListEntry

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DlBlockListConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DlBtConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DlFeedConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DlNewsConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DlRate

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DlThrottlingConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Config;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DownloadConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Feed;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DownloadFeed

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Feed;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DownloadFeedItem

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class File

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Peer

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Stats;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class DhtStats

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Stats;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
use alphayax\freebox\api\v3\models\Download\Config\DlRate;
/**

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download\Stats;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class NzbConfigStatus

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Task

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Download;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Tracker

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\FileSystem;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class FileInfo

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\FileSystem;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class FileUpload
@ -84,4 +84,4 @@ class FileUpload extends Model {
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\FileSystem;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class FsTask

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\FileSystem;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class ShareLink
@ -58,4 +58,4 @@ class ShareLink extends Model {
return $this->fullurl;
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Freeplug;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class Freeplug

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\Freeplug;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class FreeplugNetwork
@ -37,4 +37,4 @@ class FreeplugNetwork extends Model {
return $this->members;
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class FtpConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\LAN;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class LanConfig

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\LAN;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class LanHost

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\LAN;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class LanHostL2Ident

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\LAN;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class LanHostL3Connectivity

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\LAN;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class LanHostName

View File

@ -1,6 +1,6 @@
<?php
namespace alphayax\freebox\api\v3\models\LAN;
use alphayax\freebox\api\v3\Model;
use alphayax\freebox\utils\Model;
/**
* Class LanConfig

Some files were not shown because too many files have changed in this diff Show More