andyet/andbang.js — pull request #11 by lukekarrys (2013-08-15 19:54:47+00:00)
Title: Add http methods to andbang library

__Feedback please :)__

The idea of this is to expose all the socket.io methods that are also part of the REST API as

`api.http.METHOD_NAME` and have them take the same signature of arguments.

To do this the API has to be init'd like this

```
var api = new API({
useREST: true,
token: ACCESS_TOKEN
});
```

I also added an examples dir to sanity check myself that everything was working and a short test script to cover the different request scenarios (optional params, DELETE/PUT/GET/POST, etc) to make sure the request was being put together the correct way.

Also, this adds a dependency on `request` which doesn't browserify. If this is not ok, I was thinking we could have `node build` do two separate files since the socket.io is probably going to be used more anyway.