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.

Nashville – Don’t Call Us IT

Originally Published in http://www.southernalpha.com

My wife and I recently moved to the Nashville (just south of Nashville actually) from Silicon Valley. We were drawn to this city over others because of nearby family, great schools for our kids and the fact that it had a growing tech community that would allow us to continue doing what we love for work.

Nashville’s investment in technology and programs like Hack Nashville, Healthbox, Entrepreneur Center, Jumpstart Foundry, and Nashville Software School are just a few examples of the strength of the tech and entrepreneurship community here.  But, there is something about the Nashville tech community I don’t quite understand – no matter what your role in the industry might be, I keep hearing people lump their teams together under the title of IT.

Now, I am not knocking IT people here, they play a really important role in the tech ecosystem, especially for larger companies.  But, for all of my years in this industry I’ve never worked in IT, called myself an IT person, or looked for a job in IT.  I am a software engineer.

So, what’s the big deal?

Simply put –  IT and engineering are two completely different things.  To put it in more traditional Nashville terms, confusing IT and software engineering is like calling an audio engineer a songwriter, although to be fair there are probably several people in Nashville who can do both.

IT is the deployment, integration, and maintenance of hardware and software products to an organization.  Software developers/engineers are creators of software.  We build apps, launch new products (and companies) and use code to create much of the technology that consumers enjoy every day.

IT and developers work together – in the case of enterprise software, the software that developers create is deployed by IT or, in many cases, is sold to consumers.  But, grouping all technology functions together as IT undermines the expertise of each contributing team member. By distinguishing a class of technology workers who are creators, you recognize the way each role works together to bring entrepreneurs’ visions to life. Not to mention, companies must be able to identify and hire for each role with intention.

As Nashville becomes a focal point of technology, innovation, and entrepreneurship, identifying the people who help create from the ground-up, those who execute and deploy technology, and everything in between, is crucial. We need to be synchronized with our peers in the industry and across the nation.  The top companies outside of Tennessee aren’t hiring IT when they are referring to software engineers, and we shouldn’t be either. Finally, let’s retain the top talent coming out of our Nashville schools and let them know we understand their technology expertise and need their skills here in Nashville.

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.