Eventbrite API – Creating Custom Survey Questions via API

Here is a code snippet using cURL to post to the Eventbrite REST API and add a custom survey question to your event.

Get Custom Questions:
curl -X GET -H "Authorization: Bearer  [API TOKEN HERE]" -H "Cache-Control: no-cache" -H "https://www.eventbriteapi.com/v3/events/[EVENT ID HERE]/questions/?is_owner=1"
Get Specific Question:

curl -X GET -H "Authorization: Bearer  [API TOKEN HERE]" -H "Cache-Control: no-cache" -H "https://www.eventbriteapi.com/v3/events/[EVENT ID HERE]/questions/[!!---question_id--!!]/"
Set Custom Question:
curl -X POST -H "Authorization: Bearer [API TOKEN HERE]" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H -d '{
    "question": {
        "question": {
            "html": "Another Question - What should it be?"
        },
        "type": "text",
        "required": true,
        "choices": [],
        "ticket_classes": [], 
        "respondent": "attendee"
    }
}' "https://www.eventbriteapi.com/v3/events/[EVENT ID HERE]/questions/"

Eventbrite – Create an Event via the API

There didn’t seem to be any good examples of how to create an event using the EventBrite API (https://developer.eventbrite.com). I figured it was time to get something down. Here’s the JSON body I’ve used to create test events. This creates the event stub and let’s you load the API explorer.

More code examples to come.

Why work in TN?

I found this in a job posting for a position at Digital Reasoning

I really like this part:

Life in Franklin/Nashville, TN

OK, so it’s not Los Angeles, Seattle, New York, or San Francisco. No, really, that’s a good thing! Nashville has its own identity; its own sense of style. It’s friendly and warm; traditional and flamboyant at the same time. What else would you expect from The Music City!?

Moving here, you can choose to live in downtown Nashville alongside the honky-tonks, in West End surrounded by some of the nation’s best colleges, in the revitalized East Nashville district with its massive Victorian homes, green living, and unique sense of quirky culture. Of course you could also live on 30 acres of farmland just minutes from the office.

  • No state income tax!
  • Conde Nast Top 5 places in the world to visit in 2013.
  • Booming entrepreneurial community and startup infrastructure.
  • Thriving, active technology community with a group for almost any interest.
  • Countless active health groups for cycling, running, hiking, etc.
  • Significantly lower cost of living than other major technology hubs.
  • Google fiber

Really hits on a lot of the good stuff we have here. I want to post more on this in the future.

Rails4 and “undefined local variable or method `root_path'”

I recently started to mess around with Rails again and wanted to see what’s up with Rails4. I created my project using composer ( using bootstrap,haml,rails4 ) and created a simple scaffold.

When I fired up the rails server and tried to visit my scaffold page I got the following error: “undefined local variable or method `root_path'”. The error was in one of the layout templates where it referenced the root_path. I googled around a bit for the specific error with no luck. Then tried the search “rails4 root_path”. Seems like its no longer defined as a route by default. You have to do the following to get it to work:

  1. Open routes.rb
  2. add a route like the following
  3. root :to => "controller#action"

Hope this helps others!

How to get a Python Thrift client running on Mac OS

I was trying to get a Python Thrift client running on MacOS. All the stubs seemed to be missing a step of getting the actual Thrift lib installed.

Running my sample client I kept getting:

ImportError: No module named thrift.Thrift

To get around this you need the actual Thrift lib installed on your machine. I used this command ( note you might need to match your version of Thrift below ).

sudo easy_install thrift==0.9.0

Seemed to work out of the box for me after that.

Mercurial and 404

I just started working with Mercurial source control at my new job. So far so good. I moved from developing on my Mac to working on Ubuntu 10.04 LTS. I installed the default instance of Mercurial and got the out of the box version 1.4 ( or there abouts ). As I tried to clone a repo that cloned just fine on the Mac I kept on getting this error:

abort: HTTP Error 404: Not Found

I searched around a bit ( I still can’t bring myself to use the verb Googled as I was a loyal Yahoo for 11 years ) and wasn’t able to find anything that directly solved my problem. I compared the version I had running on Mac which was ~2.0. I started to wonder if the version skew was the culprit. I up’d my Ubuntu version using the instructions here:

  • sudo add-apt-repository ppa:mercurial-ppa/releases
  • sudo apt-get update
  • sudo apt-get install mercurial

I tried again and Viola… it worked. Hope this helps others.

Rest Client for Firefox – Sample POST Request

I was having fits getting the REST Client for Firefox to let me create a post body where PHP would recognize the parameters I was trying to post. I added them to the “request body” but my REST server wasn’t showing that I was even posting anything.

I found out that you have to set the “request header” section of the Firefox plugin to have a “name” = “Content-Type” and “value” = “application/x-www-form-urlencoded”. Then I was able to put something like “name=themayesfamily” in the “request body” and my server found a post variable with called “name” with the value I’d set.

Hope this helps some others.

NFS Client For Windows 7

I was trying to enable NFS on my windows 7 machine. Seems like only Ultimate and Professional have it available. Luckily I fit the bill. Here’s where to find and enable it:

This service is not installed by default and should not be installed on a “home” system. You can add or remove this service by heading to:

1. Head to Start
2. Select Control Panel
3. Select Programs
4. Select Programs and Features
5. Select Turn Windows Features on or off
6. Find the section “Services for NFS”

Default Path and Command Line Options

C:Windowssystem32nfsclnt.exe