From 6247fce6c2c5d626a6142d5387b1e05cf2ba8e34 Mon Sep 17 00:00:00 2001 From: hallo144 Date: Mon, 29 Jan 2018 12:14:41 +0100 Subject: [PATCH] Update to new URL There was still the old URL of hosted CT installations (see this forum thread: https://forum.church.tools/topic/4095/api-via-php-getcalendarevents) and the category_ids parameter did not work for me. --- calenderEvents.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/calenderEvents.php b/calenderEvents.php index a2db4e4..1236613 100755 --- a/calenderEvents.php +++ b/calenderEvents.php @@ -4,11 +4,13 @@ // Get Calendar events. Make sure the calendar is available for public user // otherwise login before -$url = 'https://mghh.churchtools.de/index.php?q=churchcal/ajax'; +$url = 'https://mghh.church.tools/index.php?q=churchcal/ajax'; $data = array('func' => 'getCalendarEvents', - 'category_ids' => [1,2,3], - 'from' => 0, - 'to' => '10'); + 'category_ids[]' => '1', + 'category_ids[]' => '2', + 'category_ids[]' => '3', + 'from' => 0, + 'to' => '10'); $result = sendRequest($url, $data); if ($result->status == "fail") { echo $result->data;