我刚刚为Eventbrite设置了一些测试事件,我正在尝试使用PHP测试它们的API,以便检索我即将发生的事件并将其显示在外部网站上。我正在遍历API结果,这按预期工作。
现在,我想在日历中显示这些相同的事件,突出显示日历日期,也许单击或悬停时显示事件详细信息。像https://fullcalendar.io/
Eventbrite API以以下格式返回数据;
Array
(
[pagination] => Array
(
[object_count] => 2
[page_number] => 1
[page_size] => 50
[page_count] => 1
[has_more_items] =>
)
[events] => Array
(
[0] => Array
(
[name] => Array
(
[text] => Johnny's Great Event
[html] => Johnny's Great Event
)
[description] => Array
(
[text] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui augue, rhoncus nec viverra ut, dapibus et dui. Nam neque neque, egestas
[html] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui augue, rhoncus nec viverra ut, dapibus et dui. Nam neque neque, egestas
)
[id] => 64717392463
[url] => https://www.eventbrite.co.uk/e/johnnys-great-event-tickets-64717392463
[start] => Array
(
[timezone] => Europe/London
[local] => 2019-08-13T19:00:00
[utc] => 2019-08-13T18:00:00Z
)
[end] => Array
(
[timezone] => Europe/London
[local] => 2019-08-13T22:00:00
[utc] => 2019-08-13T21:00:00Z
)
[organization_id] => 315049202316
[created] => 2019-07-04T08:42:53Z
[changed] => 2019-07-04T09:30:06Z
[published] => 2019-07-04T08:42:59Z
[capacity] => 20
[capacity_is_custom] =>
[status] => live
[currency] => GBP
[listed] => 1
[shareable] =>
[invite_only] =>
[online_event] =>
[show_remaining] =>
[tx_time_limit] => 480
[hide_start_date] =>
[hide_end_date] =>
[locale] => en_GB
[is_locked] =>
[privacy_setting] => unlocked
[is_series] =>
[is_series_parent] =>
[inventory_type] => limited
[is_reserved_seating] =>
[show_pick_a_seat] =>
[show_seatmap_thumbnail] =>
[show_colors_in_seatmap_thumbnail] =>
[source] => coyote
[is_free] =>
[version] => 3.7.0
[summary] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui augue, rhoncus nec viverra ut, dapibus et dui. Nam neque neque, egestas
[logo_id] => 64873328
[organizer_id] => 24364815129
[venue_id] => 33813567
[category_id] => 101
[subcategory_id] =>
[format_id] =>
[resource_uri] => https://www.eventbriteapi.com/v3/events/64717392463/
[is_externally_ticketed] =>
[logo] => Array
(
[crop_mask] => Array
(
[top_left] => Array
(
[x] => 0
[y] => 112
)
[width] => 1350
[height] => 675
)
[original] => Array
(
[url] => https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F64873328%2F315049202316%2F1%2Foriginal.20190704-084458?auto=compress&s=2df26a07f41d77c4357027d87b18468f
[width] => 1350
[height] => 900
)
[id] => 64873328
[url] => https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F64873328%2F315049202316%2F1%2Foriginal.20190704-084458?h=200&w=450&auto=compress&rect=0%2C112%2C1350%2C675&s=a9ff2404a4ca4c73cef446bcffba10b5
[aspect_ratio] => 2
[edge_color] => #4c4b4b
[edge_color_set] => 1
)
)
[1] => Array
(
[name] => Array
(
[text] => Johnny's Greater Event
[html] => Johnny's Greater Event
)
[description] => Array
(
[text] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui augue, rhoncus nec viverra ut, dapibus et dui. Nam neque neque, egestas
[html] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui augue, rhoncus nec viverra ut, dapibus et dui. Nam neque neque, egestas
)
[id] => 64718576003
[url] => https://www.eventbrite.co.uk/e/johnnys-greater-event-tickets-64718576003
[start] => Array
(
[timezone] => Europe/London
[local] => 2019-08-16T19:00:00
[utc] => 2019-08-16T18:00:00Z
)
[end] => Array
(
[timezone] => Europe/London
[local] => 2019-08-16T22:00:00
[utc] => 2019-08-16T21:00:00Z
)
[organization_id] => 315049202316
[created] => 2019-07-04T09:31:03Z
[changed] => 2019-07-04T09:42:39Z
[published] => 2019-07-04T09:39:47Z
[capacity] => 20
[capacity_is_custom] =>
[status] => live
[currency] => GBP
[listed] => 1
[shareable] =>
[invite_only] =>
[online_event] =>
[show_remaining] =>
[tx_time_limit] => 480
[hide_start_date] =>
[hide_end_date] =>
[locale] => en_GB
[is_locked] =>
[privacy_setting] => unlocked
[is_series] =>
[is_series_parent] =>
[inventory_type] => limited
[is_reserved_seating] =>
[show_pick_a_seat] =>
[show_seatmap_thumbnail] =>
[show_colors_in_seatmap_thumbnail] =>
[source] => coyote
[is_free] =>
[version] => 3.7.0
[summary] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui augue, rhoncus nec viverra ut, dapibus et dui. Nam neque neque, egestas
[logo_id] => 64874854
[organizer_id] => 24364815129
[venue_id] => 33813567
[category_id] => 101
[subcategory_id] =>
[format_id] =>
[resource_uri] => https://www.eventbriteapi.com/v3/events/64718576003/
[is_externally_ticketed] =>
[logo] => Array
(
[crop_mask] => Array
(
[top_left] => Array
(
[x] => 0
[y] => 113
)
[width] => 1350
[height] => 675
)
[original] => Array
(
[url] => https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F64874854%2F315049202316%2F1%2Foriginal.20190704-094039?auto=compress&s=66d513594d8a888a58c08bf110d308c2
[width] => 1350
[height] => 901
)
[id] => 64874854
[url] => https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F64874854%2F315049202316%2F1%2Foriginal.20190704-094039?h=200&w=450&auto=compress&rect=0%2C113%2C1350%2C675&s=9741bf5ca66de9c2daa8f21860069956
[aspect_ratio] => 2
[edge_color] => #17182a
[edge_color_set] => 1
)
)
)
)
Eventbrite确实具有html widget available,但它非常基本且非常小,无法以任何方式明显地自定义此小部件。
如何使用从其API返回的JSON结果并将其显示在日历中?
理想情况下,我想要一个免费的,可定制的解决方案。想必我将不得不使用javascript / jquery来实现这一目标?我不确定从哪里开始。我已经在线上看到了一些免费的日历插件,但是不确定哪个插件最合适。
如果有任何经验,将不胜感激。