kasperhartwich / ticketbutler
Ticketbutler.io API Integration.
Installs: 617
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kasperhartwich/ticketbutler
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- laravel/pint: ^1.13
- phpunit/phpunit: ^10.0
- symfony/var-dumper: ^6.4
README
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.