Remove REST API requirement #8

Merged
merged 4 commits into from Dec 19, 2011

Conversation

Projects
None yet
3 participants
@powdahound
Contributor

powdahound commented Dec 14, 2011

We can use methods in the new Wobot release to fetch rooms and users (roster) so that providing an API token is longer necessary. The get/post/request methods are left around in case someone does want to have the bot do something with the API.

This has the added benefit of only fetching rooms that the bot account has permission to join so it won't fail to join any rooms. It's also a little faster. :)

try
callback null, JSON.parse(data)
catch err
callback null, data or { }
response.on "error", (err) ->
- callback err, { }
+ callback err, null

This comment has been minimized.

Show comment Hide comment
@powdahound

powdahound Dec 14, 2011

Contributor

This change was necessary to prevent if response checks in callbacks passing when an error is raised.

@powdahound

powdahound Dec 14, 2011

Contributor

This change was necessary to prevent if response checks in callbacks passing when an error is raised.

@atmos

This comment has been minimized.

Show comment Hide comment
@atmos

atmos Dec 15, 2011

Looks good.

atmos commented Dec 15, 2011

Looks good.

@powdahound

This comment has been minimized.

Show comment Hide comment
@powdahound

powdahound Dec 19, 2011

Contributor

Who has the 'hipchat' account registered in the npm registry currently? I'm happy to take ownership of that, start merging things in, and pushing updates.

Contributor

powdahound commented Dec 19, 2011

Who has the 'hipchat' account registered in the npm registry currently? I'm happy to take ownership of that, start merging things in, and pushing updates.

powdahound added some commits Dec 19, 2011

Remove mention of token in setup instructions
Anyone who wants to use the API methods can discover the config easily
enough
@dtorres

This comment has been minimized.

Show comment Hide comment
@dtorres

dtorres Dec 19, 2011

Contributor

@powdahound I have i (I think), I'll give it to you asap :)

Contributor

dtorres commented Dec 19, 2011

@powdahound I have i (I think), I'll give it to you asap :)

@dtorres dtorres merged commit 8c2549e into hipchat:master Dec 19, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment