Today, we’re introducing a little API for TweetBoner.biz. It’s really simple — just add “/json” to the URL for a person’s TweetBoners and you’ll get their TweetBoners back as a valid JSON array. You can use it in your apps, your projects, your widgets, and your websites. It’s really easy to use.
Witness, as we use just a few lines of Python to get @lonelysandwich’s TweetBoners and print out their usernames and how many times @lonelysandwich has faved them!
import urllib2 import json url = "http://tweetboner.biz/lonelysandwich/json" req = urllib2.urlopen(url) jsonData = json.loads(req.read()) for user in jsonData: print user['username'] + ": ", print str(user['numberOfFaves']) + " faves"
ladybirdj: 9 faves biorhythmist: 8 faves atencio: 7 faves daveshumka: 7 faves mrgan: 6 faves ...<snip>... Moltz: 1 faves DrLabRatOry: 1 faves noahkalina: 1 faves communicatrix: 1 faves kzzxt: 1 faves
Over at TB.biz, we’ve got a page with some more information, a couple of examples (in Python and JQuery) to get you up and running, and details on exactly what you can get out of our API. This is all totally free — if you use the API, all we ask is that you link to TB from somewhere on your site or in your project.
To start with, we’ve only made an API for the TweetBoners feature of our website. If you’re a developer and you’d like to put some of TweetBoner’s other features into your app, just ask — I’m sure we can figure something out.
We can’t wait to see what people might do with our new API. Give it a try.