charltoons/hipchatter — pull request #4 by macklinu (2014-01-12 23:58:28+00:00)
Title: Added emoticons

I added support for getting an array of emoticons, or details for a specific emoticon by id/shortcut. See [Get all emoticons](https://www.hipchat.com/docs/apiv2/method/get_all_emoticons) and [Get emoticon](https://www.hipchat.com/docs/apiv2/method/get_emoticon) for API reference.

I refactored the `Hipchatter.request` function to specify which type of request is being made (GET, POST). This allows for making GET requests with query string parameters, as in the following call:

`https://api.hipchat.com/v2/emoticon?auth_token=XXX&start-index=20&max-results=5`

I also updated the `Hipchatter.url` function to allow for the query string params as well.

Let me know what you think of the code. I tried to keep things well commented and stylistically in line with the other Hipchatter functions. There are also a handful of tests, and the README has example uses as well. I'm glad to change or update things if you have suggestions. Thanks!