From 600c51e6083183a76e22c917b49560afcae35a41 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 17 Feb 2017 21:21:44 +0200 Subject: [PATCH] ga output --- app/library/App/Controllers/GaController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/library/App/Controllers/GaController.php b/app/library/App/Controllers/GaController.php index 7a1c02c..a6d77d2 100644 --- a/app/library/App/Controllers/GaController.php +++ b/app/library/App/Controllers/GaController.php @@ -79,9 +79,9 @@ class GaController extends CrudResourceController { $response = $analytics->reports->batchGet($body); /** @var \Google_Service_AnalyticsReporting_Report $report */ - $report = $response->getReports(); + $report = $response->getReports()[0]; - $data = $report[0]->getData(); + $data = $report->getData(); return var_dump($data); -- libgit2 0.21.4