IamOnStage
IamOnStage

Reputation: 203

Eventbrite API - List only upcoming events - PHP

I am looking for a way to only display upcoming events in php.

The is the code I am using which displays all events.

include "../../libraries/eventbrite/eventbrite.php"; 

$authentication_tokens = array('app_key'  => '***',
                               'user_key' => '***');
$eb_client = new Eventbrite( $authentication_tokens );

$events = $eb_client->user_list_events();

Eventbrite::eventList( $events, 'eventListRow');

Upvotes: 0

Views: 1000

Answers (1)

Dana
Dana

Reputation: 121

If you only want to display 'live' events then you need to pass in the event_status parameter as so:

$event_params = array( //pass these args through the user_list_events to only get live events
  'event_statuses' => 'live,started'
);

$events = $eb_client->user_list_events($event_params);

Upvotes: 1

Related Questions