Permalink
Browse files

Release v0.4.0

  • Loading branch information...
1 parent 7ae05e8 commit 89a4a9f25bd2670a936bbd277d80a65dc907e731 @cjoudrey committed Nov 18, 2011
Showing with 40 additions and 1 deletion.
  1. +4 −0 AUTHORS
  2. +7 −0 CHANGELOG.md
  3. +28 −0 README.md
  4. +1 −1 package.json
View
4 AUTHORS
@@ -0,0 +1,4 @@
+# Authors ordered by first contribution.
+
+Christian Joudrey <cmallette@gmail.com> (http://twitter.com/cjoudrey)
+Garret Heaton <powdahound@gmail.com> (http://powdahound.com)
View
7 CHANGELOG.md
@@ -1,3 +1,10 @@
+0.4.0 / 2011-12-06
+==================
+
+ * Added `Bot.getRoster` to obtain the bot's buddy list. (Pull Req. #15 by Garret Heaton)
+ * Added `Bot.sendIq` to send an IQ stanza. (Pull Req. #15 by Garret Heaton)
+ * XMPP `host` can now be explicitly set in `wobot.Bot`. (Pull Req. #14 by Garret Heaton)
+
0.3.1 / 2011-11-09
==================
View
28 README.md
@@ -20,6 +20,7 @@ Instantiate the `wobot.Bot` class by passing it a hash containing:
- `jid`: Jabber ID followed by `/bot`
- `password`: The account's password
- `name`: The name of the bot as it appears in HipChat. This is usually `firstname + lastname[0]`.
+ - Optional `host`: The hostname of the server.
```javascript
var wobot = require('wobot');
@@ -88,6 +89,24 @@ Send a message to either a channel or a user.
- `????_????@chat.hipchat.com` for a private message.
- `????_????@conf.hipchat.com` for a channel message.
+## getRoster(callback)
+
+Fetches the roster (buddy list).
+
+ - `callback` in the form of `function(err, roster, stanza)`
+ - `err` is a string representation of the error, if any.
+ - `roster` is an array of objects containing user data.
+ - `stanza` is the full response stanza, an `xmpp.Element`.
+
+Example return value for `roster`:
+
+```json
+[
+ { name: 'Christian Joudrey', jid: '1111_12345@chat.hipchat.com' },
+ { name: 'The Bot', jid: '1111_12346@chat.hipchat.com' }
+]
+```
+
## connect()
Connect to the server.
@@ -101,6 +120,15 @@ Load a plugin.
- `plugin`: Object with a `load` function as so: `function load (bot)`.
- `options`: Will be passed as the second argument to `load`.
+## sendIq(stanza, callback)
+
+Sends an IQ stanza and stores a callback to be called when its response is received.
+
+ - `stanza` is the `xmpp.Element` to send.
+ - `callback` in the form of `function (err, stanza)`.
+ - `err` is a string representation of the error, if any.
+ - `stanza` is the full response stanza, an `xmpp.Element`.
+
# Legal stuff
Copyright (c) 2011 Christian Joudrey. See LICENSE for details.
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "wobot",
- "version": "0.3.1",
+ "version": "0.4.0",
"description": "A plugin-based HipChat bot.",
"keywords": ["bot", "hipchat"],
"homepage": "http://github.com/cjoudrey/wobot",

0 comments on commit 89a4a9f

Please sign in to comment.