PHP code example of amirsorouri00 / eventbrite

1. Go to this page and download the library: Download amirsorouri00/eventbrite library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amirsorouri00 / eventbrite example snippets


'providers' => [
    // ... other providers
    Amirsorouri00\Eventbrite\EventbriteServiceProvider::class,
]



namespace App\Http\Controllers;

use Eventbrite;
use App\Http\Controllers\Controller;

class EventbriteController extends Controller
{
    public function getEvent(int $eventId)
    {
        return response()->json(Eventbrite::event()->get($eventId));
    }
}

Eventbrite::event()->create(int $organizerId, array $event);

Eventbrite::event()->update(int $eventId, array $event);

Eventbrite::event()->list('venue', int $venueId, array $filterParams = []);

Eventbrite::event()->list('organizations', int $organizationId, array $filterParams = []);

Eventbrite::event()->list('series', int $seriesId, array $filterParams = []);

Eventbrite::event()->publish(int $eventId);

Eventbrite::event()->unpublish(int $eventId);

Eventbrite::event()->cancel(int $eventId);

Eventbrite::event()->delete(int $eventId);
 
Eventbrite::category()->get(int $categoryId);
 
Eventbrite::category()->all(int $categoryId);
 
Eventbrite::subcategory()->get(int $subcategoryId);
 
Eventbrite::subcategory()->all(int $categoryId);
 
Eventbrite::displaySettings()->get(int $eventId);
 
Eventbrite::displaySettings()->update(int $eventId, array $displaySettings);
 
Eventbrite::user()->get($userId);
 
Eventbrite::user()->me();
 
Eventbrite::venue()->get($venueId);
 
Eventbrite::venue()->create(int $organizerId, array $venue);
 
Eventbrite::venue()->update(int $venueId, array $venue);
 
Eventbrite::venue()->list(int $organizationId);
 
Eventbrite::format->get($formatId);
 
Eventbrite::format->list();
 
Eventbrite::media->get($formatId);
 
Eventbrite::media->createUpload(array $mediaUpload);
 
Eventbrite::media->createUpload(array $mediaUploadType);

Eventbrite::event()->expand('organizer')->get($eventId);


try {
    
    Eventbrite::event()->publish(1234);
    
} catch(EventbriteErrorException $e) {
    $response = $e->getResponse();
    $responseBodyAsString = $response->getBody()->getContents();
    echo $responseBodyAsString;
}
 php
Eventbrite::event()->get($eventId);