geeksoflondon/hamster — pull request #86 by mseckington (2013-06-09 21:25:29+00:00)
Title: Eventbrite importing

Finally finished the importing of the Eventbrite data.

Running rake importer:eventbrite:import_event will give you an overview of all the events on Eventbrite. Enter the number of the event you want to import. This will create the Event, and import all the attendee/tickets.

Running rake importer:eventbrite:update_events will go over each event we currently have and import new attendees/tickets (what it won't do: update existing attendees/tickets).

So for now the way this works: the importer checks whether or not a Ticket exists with the eventbrite ticket id; if it doesn't it will create a Ticket and an Attendee.

What we don't do yet is attaching a new Ticket to an existing Attendee, but we'd need to discuss what the unique identifier of an Attendee actually is. For now the current importer should be enough.

Also made some simple changes to models:
- Venue: address is no longer required
- Attendee: added email and phone number, removed address
- Ticket: added required unique eventbrite_xid
-Event: made unique eventbrite_xid required

Currently it's not tested with VCR, cause I didn't want to risk running into doing it wrong again.

Closes #11