Fork me on GitHub

Eventbrite.NET

Will Rayner

Eventbrite.NET is an API wrapper written in C# that provides a statically typed interface for the publicly available Eventbrite API. The wrapper doesn't do anything that you can't do yourself with some HTTP fetching and XML parsing. That said, it'll be a truckload quicker to use it than write your own.

Installation

NuGet

Use NuGet to fetch and install the library for you. You can see the project's NuGet page here. This is the recommended method for install.

Install-Package eventbriteNET

GitHub Clone

  • Clone the repository:

    git clone https://github.com/penguinboy/Eventbrite.NET.git
  • Include the project within your solution and add a reference to it.

Just download the DLL

Just download the EventbriteAPI.dll file. Add a reference to the DLL in your project.

Quick Start

// Create the context object with your API details var context = new EventbriteContext("APP_KEY", "USER_KEY"); // Instantiate Organizer entity with the desired organizer ID var organizer = context.GetOrganizer(ORGANIZER_ID_HERE); // Get all the events that the organizer has created var events = organizer.Events.Values; // Get the first event in the collection var firstEvent = events.First(); // All the attendees in that event var attendees = firstEvent.Attendees; // All the tickets in that event var tickets = firstEvent.Tickets.Values;
There are plenty of properties available in each of these objects. Again, exploring is the best way to learn!

API Notes

The first thing to remember when starting to use Eventbrite.NET is that context is everything. The EventbriteContext object is the starting point for all API interactions. You instantiate the object with your application key and, if you wish to, your user key.

var context = new EventbriteContext("APP_KEY", "USER_KEY");

For here on, you have access to a GetOrganizer and GetEvent methods.

It is important to know that GetEvent will throw an error if you request an event that doesn't exist, while GetOrganizer will not. This is because there is because of limitation in the Eventbrite API, and is an unfortunate inconsistency of Eventbrite.NET.