GitHub Archive: API for GitHub’s historical timeline #

You folks create a lot of events on GitHub. Trying to mine and report on that data is definitely a big data problem. Ilya Grigorik wants to help the community get a handle on the GitHub firehose with GitHub Archive. With an API call you can get a range of GitHub’s public timeline data for all seventeen event types:

require 'open-uri'
require 'zlib'
require 'yajl'

gz = open('http://data.githubarchive.org/2012-03-11-12.json.gz')
js = Zlib::GzipReader.new(gz).read

Yajl::Parser.parse(js) do |event|
  print event
end

The source is on GitHub. Be sure and listen to Ilya on Episode 0.5.5 talking about Goliah, EventMachine, and SPDY.

Usergrid – Turnkey social graph, activity streams for your application #

Almost every application has a social layer these days. If you have users, most likely you have relationships, roles, and activity streams. Usergrid, a Java project from Apigee aims to be a turn-key platform to add these features to your application. If the thought of setting up Cassandra is intimidating, you can use their hosted version, which will also give you some analytics:

screenshot

For more info check out the project web site, API docs, or source on GitHub.

httpie – Python-powered HTTP CLI for humans #

Although cURL is great, we’re always looking for great console tools for working with HTTP. Jakub Roztocil has released HTTPie. Built on Requests, HTTPie provides a clean command line interface for HTTP requests:

http PATCH api.example.com/person/1 X-API-Token:123 name=John email=john@example.org

PATCH /person/1 HTTP/1.1
User-Agent: HTTPie/0.1
X-API-Token: 123
Content-Type: application/json; charset=utf-8

{"name": "John", "email": "john@example.org"}

I appreciate the colored terminal output:

HTTPie output

Source on GitHub.

Amon – Python-powered server monitoring, logging, and error reporting with JSON API #

Amon from Martin Rusev is a simple yet flexible way to add server monitoring, logging, and error tracking to your web stack. Amon consists of three parts: a collector daemon, a Python web app, and JSON API.

  • Collector daemon – Amon’s server and process monitoring is a thin wrapper on top of Unix tools to record metrics and store them in the MongoDB backend.
  • API – Shipping with language bindings for Python, Ruby, and JavaScript, Amon’s JSON API makes it easy to record your own application events.
  • Web interface – The web app provides a friendly user interface for viewing logs and visualizing data in charts.

Amon

The Amon documentation site is a great place to get started with installation and usage.

Renee – Sinatra-inspired Rack framework for über DRY routing #

Josh Hull knows Sinatra. As part of the Padrino, he also knows about creating new alternatives to popular frameworks. His latest effort is Renee, a web framework for Rack that aims to DRY up your routes.

We wondered though, as Sinatra fans, if we were to come up with a cleaner and more powerful DSL, what might that look like? Let’s consider an example from Sinatra to see where we can do better.

The result is a pivoted syntax that turns the routing DSL on its side:

path 'blog' do
  var do |id|
    @blog = Blog.get(id)
    get { halt @blog }
    put { @blog.update(request.params); halt :ok}
  end
end

I can see how powerful this could be for creating complex REST APIs. Check out the nicely designed web site for more.

RestSharp: Simple REST and HTTP API Client for .NET #

I’m a big fan of making idiomatic language bindings for APIs. Making common tasks such as URI generation, transport, authentication, and payload parsing configurable options and providing a higher-level API lets application developers focus on the business domain instead of low-level networking.

.NET developers looking to write API wrappers without starting from
scratch should check out RestSharp from John Sheehan. Similar to Ruby’s HTTParty and others, RestSharp provides a number of features to make writing wrappers for REST web services a snap, including:

  • Automatic XML and JSON parsing including Fuzzy element name matching (“product_id” in XML/JSON will match C# property named ‘ProductId’)
  • Support for GET, POST, PUT, HEAD, OPTIONS, DELETE
  • oAuth 1, oAuth 2, Basic, NTLM and Parameter-based Authentication
  • Multi-part form/file uploads
  • Custom serialization and deserialization via ISerializer and
    IDeserializer
  • Both sync and async requests

Example

Here’s a quick example of making a simple request for XML from an API using Basic Auth:

var client = new RestClient();
client.BaseUrl = "http://twitter.com";
client.Authenticator = new HttpBasicAuthenticator("username", "password");

var request = new RestRequest();
request.Resource = "statuses/friends_timeline.xml";

RestResponse response = client.Execute(request);

In addition to using the built-in Authenticators,
you’re free to create your own:

var client = new RestClient("http://example.com");
client.Authenticator = new SimpleAuthenticator("username", "foo", "password", "bar");

var request = new RestRequest("resource", Method.GET);
client.Execute(request);

Perhaps most impressive is RestSharp’s support for a number of environments including .NET 3.5+, Silverlight 4, Windows Phone 7, Mono, and MonoTouch. Be sure and check out the project readme for advanced usage and tips on contributing.

[Source on GitHub]

Episode 0.6.0 – Fog and The Cloud with Wesley Beary

Wynn sat down with Wesley Beary from Engine Yard to talk about the Fog project and the Cloud, live from Red Dirt Ruby Conf. Items mentioned in the show: Wesley Beary aka @geemus The Fog project is the Ruby cloud services library By coincidence this interview was recorded the day the cloud went down Fog […]

#55: Goliath, Event Machine, and SPDY with Ilya Grigorik

Wynn caught up with Ilya Grigorik, Founder and CTO of PostRank to talk about Goliath, async Ruby web development, and Google’s SPDY. Download MP3 Items mentioned in the show: We’ll be doing a live show at Red Dirt Ruby Conf. Look for Steve at CodeConf. Ilya Grigorik founder and CTO of PostRank. PostRank taps into […]

Episode 0.4.7 – Open Government and the Citizen Coder with Carl Tashian

Adam and Wynn caught up with Carl Tashian from Open Government to talk about OpenGovernment.org, OpenCongress.org, and the rise of the Citizen Coder. Items mentioned in the show: Carl Tashian is Director of Technology at Open Government OpenGovernment: Empower individuals and organizations to track government at every level OpenCongress.org – open source Rails app to […]

govkit: Open Government APIs in a box #

In the same way that Fog aims to be the “Ruby cloud services library” by providing an all-in-one bundle of wrappers for popular cloud services including Amazon, Rackspace, and others, GovKit from OpenGovernment is a Swiss Army Knife of government API wrappers. GovKit currently supports:

You’ll need to grab API keys for each service you want use. If you’re running Rails, GovKit includes a handy generator for creating an initializer to hold your config info in config/initializers/govkit.rb:

rails generate govkit

[Source on GitHub]

jquery-facebook-multi-friend-selector: A jQuery Facebook Multi-Friend Selector using the Graph API #

jQuery Facebook Multi-Friend Selector is a jQuery plugin created by Mike Brevoort that stands as an alternative for Facebook Multi-Friend Selection user interface that uses the Facebook Graph API. No server side component is necessary which makes it really easy to adapt and use.

Customization

This plugin depends on the new Facebook Javascript API, and inside the project there’s a jQuery plugin and accompanying CSS file to get you started.

You should be able to customize the look of this plugin quite a bit via CSS. For example, check out this stripped down demo to see a stacked list type selector vs the later demo we’ll mention.

Usage

Add this selector #jfmfs-container to your document and include the Facebook JavaScript API. Log in your user (FB.init and FB.login) and you will be able to load the friend selector. Check out the video below for a word from Mike on how things work.

For example:

$("#jfmfs-container").jfmfs();

This will pull back the current user’s friends and create the interface to select friends. When you’re ready to move on, there is a function you’ll need to call to return an array of the Facebook IDs of the selected friends.

var friendSelector = $("#jfmfs-container").data('jfmfs');
var selectedFriends = friendSelector.getSelectedIds();

Demo

If you want to get right to it and see a live demo, check out this demo of the jQuery Facebook Multi-Friend Selector plugin. Click “login” and then login to your Facebook account. You will then be able to see your list of friends in the friend selector.

jquery-facebook-multi-friend-selector-screenshot.png

For more details, check out this blog post and screencast.

[Source on GitHub] [Demo] [Discuss on Hacker News]

jsondns: DNS JSON API #

If you’re building a cool domain name service or DNS-related mashup, be sure and check out JSON DNS from Joël Franusic. JSON DNS aims to create a standard for DNS info in JSON, and the project includes a small Rack app for serving that data over HTTP.

// curl http://dig.jsondns.org/IN/thechangelog.com/A
{
  "header": {
    "aa": false,
    "ra": true,
    "cd": false,
    "opcode": "Query",
    "qr": true,
    "arcount": 0,
    "rcode": "NOERROR",
    "tc": false,
    "qdcount": 1,
    "nscount": 0,
    "ad": false,
    "ancount": 1,
    "id": 30523,
    "rd": true
  },
  "answer": [
    {
      "type": "A",
      "class": "IN",
      "ttl": 3600,
      "name": "thechangelog.com",
      "rdata": "72.32.231.8"
    }
  ],
  "question": [
    {
      "qname": "thechangelog.com",
      "qtype": "A",
      "qclass": "IN"
    }
  ],
  "additional": [

  ],
  "authority": [

  ]
}

JSON DNS supports lookups for A, NS, and MX records and even supports JSONP to allow cross domain access.

[Source on GitHub] [Demo] [Discuss on Hacker News]

webdis: HTTP + JSON API for Redis #

HTTP is the dial tone of the web. Apps that speak HTTP tend to grow in popularity, such as CouchDB whose built-in HTTP-based RESTful API makes it super easy to store and retrieve JSON data.

Nicolas Favre-Felix gives some web love to Redis fans with Webdis, an HTTP interface for Redis that serves up JSON. Built in C, Webdis aims to be fast like Redis itself. The URL structure takes the pattern of:

http://127.0.0.1:7379/COMMAND/KEY/[VALUE]

Let’s look at some concrete examples:

curl http://127.0.0.1:7379/SET/hello/world
→ {"SET":[true,"OK"]}

curl http://127.0.0.1:7379/GET/hello
→ {"GET":"world"}

curl -d "GET/hello" http://127.0.0.1:7379/
→ {"GET":"world"}

While still early in development, the feature set is impressive. Webdis currently offers:

  • Support for GET and POST
  • JSON and JSONP parameter (?jsonp=myFunction).
  • Raw Redis 2.0 protocol output with .raw suffix
  • HTTP 1.1 pipelining
  • TCP or UNIX socket Redis connections
  • CIDR or HTTP Basic Auth security
  • Pub/Sub using Transfer-Encoding: chunked. Coupled with JSONP, Webdis can be used as a Comet server
  • Built-in support for json, txt, ‘html, xml, xhtml, png, and jpg
  • Custom Content-Type types based on file extension, or ?type=some/thing
  • Cross-origin XHR, if compiled with libevent2 (for OPTIONS support)
  • File upload with PUT, if compiled with libevent2 (for PUT support)

Check the README for the complete list. If you’d like to contribute, Nicolas is thinking about how to add other HTTP verb support like PUT and DELETE, Websockets, and Etags.

Also, if you missed it, be sure and catch Episode 0.4.5 with @antirez, the creator of Redis.

[Source on GitHub] [Comment on Hacker News]

apiary: Event Machine API in a box for your Ruby classes #

If you need to stand up an API for your Ruby web application, you’ve got a lot of choices including Rails, Sinatra, even close-to-the-metal Rack, or Grape.

But, if you’ve got some simple Ruby classes that you’d like to expose directly as a web-based API take a look at Joshua Hull’s Apiary.

Apiary uses Thin and some Event Machine goodness to let you declare methods in your Ruby classes as API methods:

class Temperature
  include Apiary              # Include Apiary as a module in your class

  version '1.0'               # Specifies a version prefix for your api

  get                         # Marks this method as accessible from GET
  def c2f(val)                # This is now available at /1.0/c2f/:val
    Float(val) * 9 / 5 + 32
  end
end

You can start your Temperature API server with Temperature.run. Apiary will crank up Thin and listen to requests on port 3000:

curl http://localhost:3000/1.0/c2f/23.45

Apiary is brand new and will likely change, but it looks promising.

[Source on GitHub]

node-o3-canvas: HTML5 Canvas API for NodeJS #

This isn’t the first time we’ve featured the work of our friends over at Ajax.org. In the past we mentioned o3 and Cloud9 and even had them on the podcast, see episode 0.1.6.

Their project, node-o3-canvas, is an HTML5 Canvas implementation for NodeJS based on LibAGG and Freetype. It’s implemented using their previously mentioned O3 component system. The goal with node-o3-canvas is not only to create a Canvas-spec type API, but also to extend it to provide easy image resizing, and image processing API’s for server side image processing needs.

Ajax.org makes use of node-o3-canvas as a way to render Canvas charts server-side to allow emailing or save-as-picture.

Example usage

How to use:

var createContext = require('path/to/node-o3-canvas/lib/o3-canvas');

Here’s a simple example usage:

var ctx = createContext(300,300, "argb");
ctx.clearRect(0,0,300,300);
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);

var buf = ctx.pngBuffer();
console.log(buf.toBase64());

[Source on GitHub] [Readme] [Blog Post]

WatchWednesday for 20101103

Our weekly list of projects you might have missed on GitHub: RestKit RestKit is a nice high-level library for consuming REST resources in Objective C. It runs on OS X and iOS and provides three major features: Network transport including GET, POST, PUT, and DELETE Object mapping between JSON responses and local domain types, in […]

scrobbyl: Automatically Scrobble your vinyl collection in real time #

When we find them, we like to cover niche projects that show off the homebrew spirit that has always been strong in open source communities.

Scrobbyl is a Python utility to sample what’s spinning on your turntable and scrobble it to your Last.fm account.

Setup

How does it work?

First, authenticate Scrobbyl with your Last.fm account:

python lastfm.py auth

Next, make sure ffmpeg is in your PATH, hook up your turntable to your audio line in and run scrobbyl

./scrobbyl

Scrobbyl will create an audio fingerprint of your track, query it via the Echo Nest API, and update your Last.fm account.

The term scrobbyl is a mashup of scrobble and vinyl. Be sure and catch Episode 0.3.5 with Max Howell, formerly of Last.fm, who built the original Last.fm Scrobbler.

[Source on GitHub] [Home page]

resty: Piping hot REST client for bash or zsh #

I love REST APIs, so I’m always looking for new tools for the toolbox. Resty from Micha Niskin caught my eye because it can be loaded into your bash or zsh. To install, just download the script and source it.

$ curl http://github.com/micha/resty/raw/master/resty > resty
$ . resty

Now your shell is loaded up with the Resty commands. First, set an API endpoint, like GitHub:

$ resty http://github.com
http://github.com*

Now we can make any normal GET, POST, PUT, or DELETE as you would expect.

GET /pengwynn.json

For formatted output, pipe it to pretty print:

GET /pengwynn.json | pp

… or save to a file

GET /pengwynn.json > me.json

REST on the Couch

Resty is perfect for CouchDB. Just set your endpoint

resty http://127.0.0.1:5984

… and you’re ready to create datbases

PUT /test '{}'

… and stash documents.

PUT /test/me < me.json

cURL-ing

Since Resty sits on top cURL, any additional options after the required path will be passed along to cURL:

resty http://github.com/api/v2/json
GET /repos/show/pengwynn -u pengwynn:0U812

Be sure to check out Jan-Piet Mens’ introductory screencast or the README for advanced usage.

[Source on GitHub] [Screencast]

no.de: CLI for Joyent’s Node.js hosting #

Joyent’s No.de sevice and its API look to be an exciting option to host Node.js projects. Jeremy Johnstone brings that API to your CLI with his no.de wrapper.

no.de can be installed via npm:

npm install no.de

Next, configure your API credentials:

$ no.de config --api pengwynn S3CR3T
New config options for API have been saved!

Setting up a new no.de instance requires an invite, or coupon. You can check if you’ve got any available with the coupons command.

$ no.de coupons
You have no available coupons! Try requesting one maybe?

D’oh, no soup for us. Let’s request one, maybe we’ll get lucky:

$ no.de coupons --request
You have already requested a coupon.

I got this message because I had already requested one by showing the API some love, literally:

$ curl -k -u pengwynn:S3CR3T https://api.no.de/♥ -X POST

Oh well, if someone at Joyent is reading this, I’d love a coupon.

**UPDATE

Thanks so much to konobi for hooking me up!

[Source on GitHub] [Joyent’s no.de]

htty: HTTP TTY, curl meets lynx in an HTTP console #

We’ve covered a number of web console tools like Webshell, a nifty HTTP console for Node.js, and Twurl, the Twitter-specific tool for Ruby.

But when Nils Jonsson created an incredibly useful HTTP console with some old-school flair, we took notice. HTTY brings HTTP to a handy terminal shell in what Nils describes as a combination of curl and lynx.

HTTY is installed as a gem:

sudo gem install htty

You can then fire up the console with your API or web site endpoint:

$ htty http://github.com/pengwynn.json
*** Welcome to  htty , the HTTP TTY. Heck To The Yeah!
http://github.com/pengwynn.json>

To make a request, just use the get command

get
*** Type cookies-u[se] to use cookies offered in the response
 200  OK -- 10 headers* -- 27206-character body
http://github.com/pengwynn.json>

To see what we got back from the server, just use body:

$ body
[{"repository":{"description":"(Mac OS) TVShows 2 "Phoenix" is the next iteration of the easiest way to download your favorite TV shows automatically.","has_issues":false,"homepage":"http://embercode.com/tvshows/","fork":false,"has_downloads":true,"watchers":78,"pushed_at":"2010/08/16 14:39:36 -0700","url":"http://github.com/mattprice/TVShows","private":false,"name":"TVShows","owner":"mattprice","forks":10,"has_wiki":false,"created_at":"2009/09/15 17:44:46 -0700","open_issues":7},"created_at":"2010/09/05 21:04:43 -0700","sha":null,"public":true,"actor":"pengwynn"
...

HTTY is incredibly well documented, and the help command lists the full power of the console:

$ help

                                   Navigation

  a[ddress] address            Changes the address of the request
  cd path                      Alias for pa[th-set]
  fol[low]                     Changes the address of the request to the value
                               of the response's 'Location' header
  fragment-c[lear]             Alias for fragment-u[nset]
  fragment-s[et] fragment      Sets the fragment of the request's address
  fragment-u[nset]             Removes the fragment from the request's address
  history                      Displays previous request-response activity in
                               this session
  history-[verbose]            Displays the details of previous request-response
                               activity in this session
  ho[st-set] host              Changes the host of the request's address
  pa[th-set] path              Changes the path of the request's address
  por[t-set] port              Changes the TCP port of the request's address
  query-c[lear]                Alias for query-unset-[all]
  query-s[et] name value       Sets a query string parameter in the request's
                               address
  query-unset name             Removes a query string parameter from the
                               request's address
  query-unset-[all]            Clears the query string of the request's address
  r[euse] index                Copies a previous request by the index number
                               shown in history
  sc[heme-set] scheme          Changes the scheme (protocol identifier) of the
                               request's address
  userinfo-c[lear]             Alias for userinfo-u[nset]
  userinfo-s[et] userinfo      Sets the userinfo of the request's address
  userinfo-u[nset]             Removes the userinfo from the request's address

                               Building Requests

  body-c[lear]                 Alias for body-u[nset]
  body-req[uest]               Displays the body of the request
  body-s[et]                   Sets the body of the request
  body-u[nset]                 Clears the body of the request
  cookie-a[dd] name [value]    Alias for cookies-a[dd]
  cookie-r[emove] name         Alias for cookies-remove
  cookies                      Displays the cookies of the request
  cookies-a[dd] name [value]   Adds a cookie to the request
  cookies-c[lear]              Alias for cookies-remove-[all]
  cookies-remove name          Removes from the request the last cookie having a
                               particular name
  cookies-remove-[all]         Removes all cookies from the request
  cookies-u[se]                Uses cookies offered in the response
  header-s[et] name value      Alias for headers-s[et]
  header-u[nset] name          Alias for headers-unset
  headers-c[lear]              Alias for headers-unset-[all]
  headers-req[uest]            Displays the headers of the request
  headers-s[et] name value     Sets a header of the request
  headers-unset name           Removes a header of the request
  headers-unset-[all]          Removes all headers from the request

                              Inspecting Responses

  body[-response]              Displays the body of the response
  headers[-response]           Displays the headers of the response
  st[atus]                     Displays the status of the response

                                 Miscellaneous

  e[xit]                       Alias for qui[t]
  hel[p] [command]             Displays this help table, or help on the
                               specified command
  qui[t]                       Quits htty

As many readers know, I’m a sucker for embedded humor, so I also got a chuckle from the exit message:

$ quit
*** Happy Trails To You!

[Source on GitHub]

facebook-ios-sdk: Drop Facebook into your iOS application #

Facebook loves iOS developers. First, they gave us Three20, a nice iOS app framework extracted from their popular native app. Now they’ve released the Facebook iOS SDK which lets you easily add authorization, API calls, and Facebook dialogs to your iOS apps.

Authorization

To authorize a user using OAuth2 you can simply create the Facebook client and call authorize

facebook = [[Facebook alloc] init];
[facebook authorize:apiKey permissions:permissions delegate:self];

Making API calls

Now you can do things like getting info for the authenticating user:

[facebook requestWithGraphPath:@"me" andDelegate:self];

or get that users’s friends

[facebook requestWithGraphPath:@"me/friends" andDelegate:self];

[Source on GitHub]

webshell: A console-based JavaScripty web client utility (using node.js) #

If you’re like me, you probably spend a good deal of time using cURL from the console or Hurl on the web to test/inspect/debug HTTP stuffs. Wanting something a bit more robust and console-friendly Evan Haas and Sean Coates have created Webshell.

Webshell is built on Node.js (of which we’re big fans), and gives you a simple console to load and debug HTTP calls, follow 302 redirects, store history, process JSON, and more:

To run, clone the project and then fire up the shell with Node:

node shell.js 

Then you’re all set to start making HTTP requests:

webshell> GET http://google.com/
HTTP 301 http://google.com/
webshell> $_.headers
{ location: 'http://www.google.com/'
, 'content-type': 'text/html; charset=UTF-8'
, date: 'Sun, 08 Aug 2010 22:38:23 GMT'
, expires: 'Tue, 07 Sep 2010 22:38:23 GMT'
, 'cache-control': 'public, max-age=2592000'
, server: 'gws'
, 'content-length': '219'
, 'x-xss-protection': '1; mode=block'
, connection: 'close'
}
webshell> $_.headers.location
'http://www.google.com/'
webshell> $_.follow()
HTTP 302 http://www.google.com/
webshell> $_.headers.location
'http://www.google.ca/'
webshell> $_.follow()
HTTP 200 http://www.google.ca/
webshell> $_.raw.substring(0, 50)
'<!doctype html><html><head><meta http-equiv="conte'
webshell> ^D

The built-in JSON processing is slick:

webshell> GET http://twitter.com/users/coates.json
HTTP 200 http://twitter.com/users/coates.json
webshell> $_.json.name
'Sean Coates'
webshell> ^D

[Source on GitHub]

Open Graph – Ruby library for Facebook’s new API #

[Updated]: Thanks to Michael’s correction in the comments below and more caffeine it’s apparent that Michael released two entirely unrelated Facebook gems yesterday. Also, as Mike points out, the example in this case is hypothetical since IMDb does not yet support OpenGraph.

OpenGraph is a way to let web publishers turn ordinary web pages into rich objects in a user’s social graph just by embedding some meta tags on the page:

<html xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
...
</head>
...
</html>

With Michael’s gem, you can now query a site and get this information back:

require 'opengraph'

movie = OpenGraph.fetch(http://www.imdb.com/title/tt0117500')

movie.title # => 'The Rock'
movie.movie? # => true
movie.image # => 'http://ia.media-imdb.com/images/rock.jpg'

Nifty.

[Source on GitHub] [OpenGraph protocol] [Facebook API docs]

Twurl – OAuth-enabled curl for the Twitter API #

OAuth is cool but developing with OAuth can be a pain. Inspired by curl and Hurl.it (featured on Episode 0.1.5 with Leah Culver), the Twitter team has realeased a couple of tools to make developing with the Twitter OAuth API much easier.

Twurl is a Ruby gem from Marcel Molina that lets you make requests to the Twitter OAuth API from the console. To begin install the gem:

sudo gem install twurl

Then from the command line (not the Ruby console) you can authorize twurl using your API keys:

$ twurl authorize --consumer-key the_key       
                --consumer-secret the_secret

Now you can make requests to API methods:

$ twurl /1/statuses/home_timeline.xml

The Twitter team also has a nifty GUI version up on the new Twitter Developers Site that even pre-populates your Twitter apps in a drop-down.

[Source on GitHub] [Web version]

jsawk – Powerful JSON querying on SpiderMonkey #

As JSON becomes the lingua franca of web-based APIs, you might find yourself needing a way to query large chunks of data in JSON format.

jsawk from Micha Niskin provides awk-like functionality:

cat /data/athletes | jsawk 'this.sports = this.sports.join(",")'

In this example, we read the contents of a JSON file and pipe it into jsawk and concatenate the array of sports into a delimited string.

jsawk also supports the popular JSONQuery syntax with the -q option.

Be sure to check out full installation instructions and extensive examples in the README.

[Source on GitHub]