From 70654cdbc6df4dbff8b7b104ba14ac4498b00b3e Mon Sep 17 00:00:00 2001 From: Peter Molnar Date: Wed, 8 Sep 2021 09:47:06 +0100 Subject: [PATCH] eventbrite api json export to be parsed as schedule directly --- .gitignore | 1 + index.php | 47 +++++++++++++---------------------------------- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index 214f1b3..b43d506 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ **.odt +eventbrite*.json diff --git a/index.php b/index.php index 98562b6..d74cf95 100644 --- a/index.php +++ b/index.php @@ -175,38 +175,17 @@ $event_templates = json_decode('{ } }', True); -$event_schedules = json_decode('[ - { - "start": "2021-10-02T17:00:00+01:00", - "end": "2021-10-02T19:00:00+01:00", - "type": "archery", - "url": "https://www.eventbrite.co.uk/e/pa-kua-chinese-archery-tickets-169252373405" - }, - { - "start": "2021-11-06T17:00:00+00:00", - "end": "2021-11-06T19:00:00+00:00", - "type": "archery", - "url": "https://www.eventbrite.co.uk/e/pa-kua-chinese-archery-tickets-169252373405" - }, - { - "start": "2021-12-04T17:00:00+00:00", - "end": "2021-12-04T19:00:00+00:00", - "type": "archery", - "url": "https://www.eventbrite.co.uk/e/pa-kua-chinese-archery-tickets-169252373405" - }, - { - "start": "2022-01-08T17:00:00+00:00", - "end": "2022-01-08T19:00:00+00:00", - "type": "archery", - "url": "https://www.eventbrite.co.uk/e/pa-kua-chinese-archery-tickets-169252373405" - } -]', True); - +$archery_schedules = json_decode(file_get_contents('eventbrite-archery.json'), True); +$archery_schedules = $archery_schedules["events"] ?> - - - + + +
@@ -216,12 +195,12 @@ $event_schedules = json_decode('[
When: -