23 lines
517 B
PHP
23 lines
517 B
PHP
<?php
|
|
|
|
namespace app\commands;
|
|
|
|
use Yii;
|
|
use yii\console\Controller;
|
|
|
|
class TestController extends Controller
|
|
{
|
|
public function actionIndex()
|
|
{
|
|
$client = new \app\components\ApiClient(Yii::$app->params['zmUrl'].'zm/api');
|
|
print_r($client->getVersion());
|
|
}
|
|
|
|
public function actionEvents($id)
|
|
{
|
|
$client = new \app\components\ApiClient(Yii::$app->params['zmUrl'].'zm/api');
|
|
//print_r($client->getAllEvents($id));
|
|
print_r($client->getEvents($id, date("Y-m-d H:i:s", strtotime('-10 days'))));
|
|
}
|
|
}
|