Skip to content

Instantly share code, notes, and snippets.

@ryanj
Created September 3, 2012 08:41
Show Gist options
  • Save ryanj/6a66d93a54a69d4e3f50 to your computer and use it in GitHub Desktop.
Save ryanj/6a66d93a54a69d4e3f50 to your computer and use it in GitHub Desktop.
Eventbrite contact lists

Eventbrite contact list management methods

These calls should also be available as methods on Eventbrite php, python, ruby, and javascript API clients, available at http://eventbrite.github.com#libraries

PHP:

$contact_lists = $eb_client->user_list_contact_lists();
$contact_list = $eb_client->contact_list_get(array('contact_list_id'=> ID ));

Python:

contact_lists = eb_client.user_list_contact_lists()
contact_list = eb_client.contact_list_get({'contact_list_id': ID})

Ruby:

contact_lists = eb_client.user_list_contact_lists()
contact_list = eb_client.contact_list_get({'contact_list_id': ID})

Javascript:

eb_client.request('user_list_contact_lists', function( response ){
    console.log( response );
});
eb_client.request('contact_list_get', {'contact_list_id': ID}, function( response ){
    console.log( response );
});

user_list_contact_lists()

Show all contact lists for the current user.

no input parameters (aside from authentication tokens).

This call should return a list of contact lists that this user has created. Here is an example request (please substitute your auth keys):

https://www.eventbrite.com/json/user_list_contact_lists?app_key=YOUR_APP_KEY&user_key=YOUR_USER_KEY

Sample Response:

{"contact_lists": [{"contact_list": {"id": 213484, "num_recipients": "12", "name": "Organizers"}}, {"contact_list": {"id": 132041, "num_recipients": "4", "name": "Previous Attendees"}}]}

contact_list_new()

Create a new contact list

required input parameters:

  • contact_list_id : CONTACT_LIST_ID
  • name : CONTACT_LIST_NAME
  • first_name_1 : NEW_FIRST_NAME_1
  • last_name_1 : NEW_LAST_NAME_1
  • email_1 : EMIAL_1

optional input parameters:

  • first_name_2 : NEW_FIRST_NAME_2
  • last_name_2 : NEW_LAST_NAME_2
  • email_2 : EMIAL_2
  • first_name_3 : NEW_FIRST_NAME_3
  • last_name_3 : NEW_LAST_NAME_3
  • email_3 : EMIAL_3
  • ... continue incrementing to add more contacts

This call should return the id for the newly created contact list:

https://www.eventbrite.com/json/contact_list_new?app_key=YOUR_APP_KEY&user_key=YOUR_USER_KEY&name=API%20Team&first_name_1=Ryan&last_name_1=Jarvinen&email_1=ryanj%40eventbrite.com&first_name_1=API&last_name_2=Support&email_2=api%40eventbrite.com

Sample Response:

{"contact": {"count": 2, "status": "OK", "message": "contact_list_new : Complete ", "id": 317660}}

contact_list_get()

Show the identified contact list (owned by the current user).

required input parameters:

  • contact_list_id : CONTACT_LIST_ID

This call should return the identified contact list. Here is an example request (please substitute your auth keys):

https://www.eventbrite.com/json/contact_list_get?app_key=YOUR_APP_KEY&user_key=YOUR_USER_KEY&contact_list_id=CONTACT_LIST_ID

Sample Response:

{"contact_list": {"contacts": [{"contact": {"date_last_emailed": "", "date_added": "2011-12-01", "first_name": "ryan", "last_name": "jarvinen", "email": "ryanj@eventbrite.com"}}, {"contact": {"date_last_emailed": "", "date_added": "2011-12-01", "first_name": "API", "last_name": "Support", "email": "api@eventbrite.com"}}, {"contact": {"date_last_emailed": "", "date_added": "2011-12-01", "first_name": "random", "last_name": "user", "email": "fakeemail@nodelivery.com"}}], "id": 213484, "name": "Organizers"}}

contact_list_update()

Make an update to an existing contact list by id. Contacts are stored as an ordered triplet of data. Contacts that are omitted during an update will not be modified or removed.

required input parameters:

  • contact_list_id : CONTACT_LIST_ID

optional input parameters:

  • name : CONTACT_LIST_NAME
  • first_name_1 : NEW_FIRST_NAME_1
  • last_name_1 : NEW_LAST_NAME_1
  • email_1 : EMIAL_1
  • first_name_2 : NEW_FIRST_NAME_2
  • last_name_2 : NEW_LAST_NAME_2
  • email_2 : EMIAL_2
  • first_name_3 : NEW_FIRST_NAME_3
  • last_name_3 : NEW_LAST_NAME_3
  • email_3 : EMIAL_3
  • ... continue incrementing to update or add more contacts

This call should return a list of contact lists that this user has created. Here is an example request (please substitute your auth keys):

https://www.eventbrite.com/json/contact_list_update?app_key=YOUR_APP_KEY&user_key=YOUR_USER_KEY&contact_list_id=317660&first_name_1=Ryan&last_name_1=Jarvinen&email_1=ryanj%40eventbrite.com&first_name_1=API&last_name_2=Support&email_2=api%40eventbrite.com

Sample Response:

{"contact": {"count": 2, "status": "OK", "message": "contact_list_update : Complete ", "id": 317660}}

contact_list_delete()

Delete a contact list by id.

required input parameters:

  • contact_list_id : CONTACT_LIST_ID

This call should delete the identified contact list:

https://www.eventbrite.com/json/contact_list_delete?app_key=YOUR_APP_KEY&user_key=YOUR_USER_KEY&contact_list_id=CONTACT_LIST_ID

Sample Response:

{"contact": {"status": "OK", "message": "contact_list_delete : Complete ", "id": 317860}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment