定制 adigital/eventbrite 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adigital/eventbrite

Composer 安装命令:

composer require adigital/eventbrite

包简介

Integration with Eventbrite API

README 文档

README

Integration with Eventbrite API to read information and return it in a variable.

Requirements

This plugin requires Craft CMS 5.0.0 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require adigital/eventbrite
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Eventbrite.

Eventbrite Overview

Configuring Eventbrite

The following screenshot of the plugin settings page gives an indication of how it works - you need to provide an Eventbrite API key and organisation ID, and these settings are only editable by admins on environments where the allowAdminChanges setting is enabled.

Craft CMS Eventbrite Plugin Admin Settings

There's also a settings page which can be accessed by non-admin accounts with the right permission in all environments regardless of the allowAdminChanges setting. This page enables users to optionally specify additional event IDs not set up by their organisation to return along with their organisation's events. See screenshots of this settings page and permission below:

Craft CMS Eventbrite Plugin User Settings

Screenshot 2019-10-17 at 10 46 24

Using Eventbrite

The Plugin Variable

Once configured, data is returned through the plugin variable using the following methods:

craft.eventbrite.allEvents([expansions] = null, sort = true, time_filter = "current_future", unlistedEvents = false, status = "live")

This method returns all events planned by the organisation and specified by the additional event IDs setting. The expansions parameter should be a Twig array where the values correspond to the additional models that can be returned when querying data from the API. You can see the expansions that are available for events in the documentation. The sort parameter will sort events by date by default when organisation and other events are being combined. The time_filter parameter defaults to current and future events, but can also be past or all. The unlistedEvents parameter can be set as true if you want to return unlisted events. Finally, status defaults to only retrieve live events, but can also be set as draft, started, ended, completed, or canceled.

craft.eventbrite.organisationEvents([expansions] = null, time_filter = "current_future", unlistedEvents = false, status = "live")

This method returns only events planned by the organisation, with the parameters working in the same way as the allEvents method.

craft.eventbrite.otherEvents([expansions] = null, sort = true, time_filter = "current_future", unlistedEvents = false)

This method returns only events specified by the 'Other Event Ids' setting, with the parameters working in the same way as the allEvents method.

craft.eventbrite.eventById(eventId, [expansions] = null, fullDescription = true, unlistedEvent = false)

This method returns a single event by its ID, which should be the numeric ID for the event in Eventbrite. Expansions are specified as described above and the full HTML description for the event can be optionally returned and accessed with eventVariable['htmlDescription']['description'].

organisationVenues()

This method returns all the venues belonging to the organisation specified in the plugin settings.

venueById(venueId)

This method returns a venue by its ID, which should be the numeric ID for the venue in Eventbrite.

venueEvents(venueId, [expansions] = null, unlistedEvents = false, status = "live" onlyPublic = "true")

This method returns only events held at the venue specified by the venueId parameter, with the other parameters working in the same way as the allEvents method, and the additional onlyPublic parameter that states whether the events returned should be filtered by whether they are public.

Caching

As the plugin reads live data from the Eventbrite API, you should wrap any use of the variable in your Twig templates within Craft cache tags to reduce your calls to the API and improve page load times.

Eventbrite Roadmap

Things to do, and ideas for potential features:

  • Add methods to write back to Eventbrite so purchasing of tickets can be completed without going offsite
  • Explore use of other API methods to expand data returned and possibly add more event stats to Craft

Brought to you by A Digital

adigital/eventbrite 适用场景与选型建议

adigital/eventbrite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.66k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cms」 「eventbrite」 「Craft」 「craftcms」 「craft-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 adigital/eventbrite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 adigital/eventbrite 我们能提供哪些服务?
定制开发 / 二次开发

基于 adigital/eventbrite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-22