Eventbrite javascript (node.js) API Client
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
LICENSE
README.md
package.json

README.md

Eventbrite.npm

A javascript client library (Node.js module) for the Eventbrite API

WARNING: This library uses Eventbrite API endpoints that have been deprecated (as of April 2015).

See Eventbrite's developer site for updated info on how to use thier new APIs: https://developer.eventbrite.com

Installation

npm install eventbrite

Examples

First, load the Eventbrite module

var Eventbrite = require('eventbrite');

Initialize your API client

Add your API key below. Optionally, you can also supply a user_key to access private data. Clients that do not provide a valid user_key will be limited to public data access levels.

var eb_client = Eventbrite({'app_key':"YOUR_API_KEY", 'user_key':"YOUR_USER_KEY"});

event_search

var params = {'city': "San Francisco", 'region': "CA"};

eb_client.event_search( params, function(err, data){
    console.log(err);
    console.log(data);
});

event_get

eb_client.event_get( {'id': EVENT_ID }, function(err, data){
    // render the event as a ticket widget:
    var ticket_widget_html = eb_client.widget.ticket( data.event ); 

    // or, render it as a countdown widget:
    var countdown_widget_html = eb_client.widget.countdown( data.event ); 

    console.log( countdown_widget_html + ticket_widget_html );
});

event_list_attendees

eb_client.event_list_attendees ( {'id': EVENT_ID }, function(err, data){
    console.log(err);
    console.log(data);
});

user_list_events

eb_client.user_list_events ( {}, function(err, data){
    console.log(err);
    console.log(data);
});

Check out the Eventbrite developer docs for more information about the functions available through the API.

Resources