2016-05-24 20:55:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/// Require Composer AutoLoader
|
|
|
|
require_once '../../vendor/autoload.php';
|
|
|
|
|
|
|
|
/// Define our application
|
|
|
|
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.download', 'PHP API Example (Download)', '1.0.0');
|
|
|
|
$App->authorize();
|
|
|
|
$App->openSession();
|
|
|
|
|
2016-05-24 21:33:30 +02:00
|
|
|
/// List of all downloads
|
2016-05-24 20:55:26 +02:00
|
|
|
$DownloadService = new \alphayax\freebox\api\v3\services\download\Download( $App);
|
|
|
|
$Downloads = $DownloadService->getAll();
|
|
|
|
print_r( $Downloads);
|
2016-05-24 21:33:30 +02:00
|
|
|
|
|
|
|
/// Stats
|
|
|
|
$Stats = $DownloadService->getStats();
|
|
|
|
print_r( $Stats);
|