Using Reporter as a Foursquare Client

After spending some time with Reporter’s JSON output, I’ve been thinking about ways to leverage it as a input method for other tools and services. Perhaps the most obvious is Foursquare, since Reporter already pulls from the Foursquare API for its location data.

Getting this to work just requires a little API mojo and grep parsing of your Reporter questions.


The Script

Once you have that all set up, here is the script that Hazel should fire when your files change. You’ll need to add your filepath on line 18 and your API token on line 19. If you want your checkins to be public, you can either remove line 74 or change the value to “public.”

Then you should be off to the races. I’ve only tested this out for a few days, so if it’s crazy broken let me know and I’ll see if I can tweak it. This is my first time really working with net/http — usually I take a shortcut and just use curl — but I wanted to try making it “pure” ruby. Much of the credit goes to Paw for helping with that last API call.

comments powered by Disqus