This is a client for the Ticketbutler API.
- PHP 8.1
- Laravel =>8.x
You can install the package via composer:
composer require kasperhartwich/ticketbutlerCreate a API token in your Ticketbutler account. You can find it under General settings > API access.
use Ticketbutler\Ticketbutler;
$ticketbutler = new Ticketbutler('your-api-token', 'example.com');
$tickets = $ticketbutler->getTickets();Add your Ticketbutler token and domain key to your .env file:
TICKETBUTLER_TOKEN=your-token
TICKETBUTLER_DOMAIN=example.comIf you want to publish the config file you can run:
php artisan vendor:publish --tag=ticketbutlerUsing Ticketbutler in your controller:
use Ticketbutler\Ticketbutler;
class MyController extends Controller
{
public function index(Ticketbutler $ticketbutler)
{
$tickets = $ticketbutler->getTickets();
}
}composer test| Section | Method | Supported |
|---|---|---|
| Events | Get all Events | ✅ getEvents() |
| Events | Create an event | ❌ |
| Events | Get Specific Event | ✅ getEvent($eventUuid) |
| Events | Update event | ❌ |
| Events | Delete event | ❌ |
| Ticket types | Get event ticket types | ✅ getEventTicketTypes($eventUuid) |
| Ticket types | Create Ticket Type | ❌ |
| Ticket types | Get Specific Ticket Type | ❌ |
| Ticket types | Update Ticket Type | ❌ |
| Ticket types | Delete Ticket Type | ❌ |
| Data Collection | Get Ticket Type Questions | ✅ getTicketTypeQuestions($eventUuid) |
| Data Collection | Get Purchase Questions | ✅ getPurchaseQuestions($eventUuid) |
| Data Collection | Delete Ticket Type | ❌ |
| Data Collection | Create/Update Ticket Type Questions | ❌ |
| Data Collection | Get Specific Question | ✅ getSpecificQuestion($eventUuid) |
| Data Collection | Update Specific Question | ❌ |
| Data Collection | Delete Specific Question | ❌ |
| Orders | Create Order | ❌ |
| Orders | Get a Specific Order | ❌ |
| Orders | Get events orders | ✅ getEventOrders($eventUuid) |
| Orders | Update order | ❌ |
| Orders | Refund an order | ❌ |
| Orders | Collect Order Data | ❌ |
| Orders | Get Collected Data from order | ✅ getCollectedDataFromOrder($orderUuid) |
| Event Discount codes | Create a discount code | ❌ |
| Event Discount codes | Get event discount codes | ✅ getEventDiscountCodes($eventUuid) |
| Event Discount codes | Toggle discount code | ❌ |
| Event Discount codes | Delete discount codes | ❌ |
| Generic Discount codes | Create a discount code | ❌ |
| Generic Discount codes | Get discount codes | ✅ getGenericDiscountCodes($eventUuid) |
| Generic Discount codes | Toggle discount code | ❌ |
| Generic Discount codes | Delete doscount codes | ❌ |
| Tickets | Get event tickets | ✅ getTickets() |
| Tickets | Get specific ticket | ❌ |
| Tickets | Update ticket details | ❌ |
| Tickets | Collect Ticket Data | ❌ |
| Tickets | Get Ticket Specific Questions | ❌ |
| Platform Data Exporting | Get all newsletter signups | ✅ getAllNewsletterSignups() |
| Platform Data Exporting | Get Orders by Month | ✅ getGetOrdersByMonth() |
The MIT License (MIT). Please see License File for more information.