Building An API…

I’ve decided it’s important for me to be able to expand my trivia to many different platforms.  Although it’s simple to just make it for facebook and call it a day, I think it’s something that should be more than that.

So, I’m building an api for it.  The game play api (as I’ll call it) will allow me to build other front end applications, which will all effectively operate the same way… It’ll delay the release by a little bit, but it’s something I have to do.

Coding PHP

Dictionary APIs are Fun.

As part of my Hangman! application on Facebook, I plan on adding word definitions.  Like any good word app, it should tell you what the word means.  I’m not a big fan of sending off users to other sites when I don’t have to, so I looked into some dictionary APIs.

These APIs are hard to come by.  Google has a pretty good one, but it’s not open. It’s not open because their third party data providers won’t allow it to be open.  I still whipped up a little PHP love to use it, but I can’t actively use it on a public site because of their restrictions.  So I had to find something else. All the big obvious players like and have APIs that aren’t free or fun.

Then I found Wordnik.  They have a sweet, sweet, young API that they were kind enough to give me access to.  As soon as I whip up my own little library to interface with it in a happy efficient way, I’ll be adding definitions and other fun word-related things to Hangman!

Coding PHP Zend Framework

All I Need is REST, Vimeo, Flickr, Zend and More

Here’s my skeleton for my magical REST interface. It’s still missing a lot of method calls for Flickr and Vimeo, but the guts are there and the remaining methods will be done in priority when I need them.  Right now it supports automatic caching and logging via simple options.

At some point I’ll probably put it on a public SVN repository, but for now you can have the tarball.  There’s a README in the file with a simple sample. And the source is pretty self explanatory so you should be able to figure it out if you want to.

The remainder of the work will be done in the order I see fit.  Likely read-only methods (most of the getters) Authentication and write methods will be much much later.

I’ll also add more RESTful interfaces as I need them.  Probably Facebook soon, Twitter later.  Who knows.

Drop your comments here if you’ve got any questions.