kasperhartwich/ticketbutler

Ticketbutler.io API Integration.

2.2 2024-02-02 11:26 UTC

This package is auto-updated.

Last update: 2024-05-01 00:17:40 UTC


README

Latest Version on Packagist Tests

This is a client for the Ticketbutler API.

Requirements

  • PHP 8.1
  • Laravel =>8.x

Installation

You can install the package via composer:

composer require kasperhartwich/ticketbutler

Usage

Create a API token in your Ticketbutler account. You can find it under General settings > API access.

General

use Ticketbutler\Ticketbutler;

$ticketbutler = new Ticketbutler('your-api-token', 'example.com');
$tickets = $ticketbutler->getTickets();

Laravel

Add your Ticketbutler token and domain key to your .env file:

TICKETBUTLER_TOKEN=your-token
TICKETBUTLER_DOMAIN=example.com

If you want to publish the config file you can run:

php artisan vendor:publish --tag=ticketbutler

Using Ticketbutler in your controller:

use Ticketbutler\Ticketbutler;

class MyController extends Controller
{
    public function index(Ticketbutler $ticketbutler)
    {
        $tickets = $ticketbutler->getTickets();
    }
}

Testing

composer test

Supported API methods

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()

License

The MIT License (MIT). Please see License File for more information.