Accessing Raw Presence Information

More API information can be found at http://dev.libraryh3lp.com/.

If you are a creative hacker type, and you want to do something more (or less) sophisticated than we have provided in the chat snippets management page in the admin dashboard, you still have options. You can access the raw presence information directly from the server, in a variety of representations.

Queues

You can fetch presence information for queues from any of the following URLs. Swap out your queue name for "name" and take care to point to the correct regional server:

http://libraryh3lp.com/presence/jid/name/chat.libraryh3lp.com/text
http://libraryh3lp.com/presence/jid/name/chat.libraryh3lp.com/xml
http://libraryh3lp.com/presence/jid/name/chat.libraryh3lp.com/js

Users

For users (instead of queues), the URL is slightly changed. Swap out the username for "name" and take care to point to the correct regional server:

http://libraryh3lp.com/presence/jid/name/libraryh3lp.com/text
http://libraryh3lp.com/presence/jid/name/libraryh3lp.com/xml
http://libraryh3lp.com/presence/jid/name/libraryh3lp.com/js

If you use the image output, you can choose from a variety of presence theme icon sets. The default icon used in the chat box is:

http://libraryh3lp.com/presence/jid/name/chat.libraryh3lp.com/image/simpletext

You can see the available themes here.

You can fetch these either on the client-side, in JavaScript, or on the server-side.

Note that when accessing presence information from JavaScript, you may run into issues with browser-caching. A simple work-around is to append a timestamp:

'http://libraryh3lp.com/presence/jid/me/libraryh3lp.com/image/jsf-text?' + new Date().getTime()

Have fun!


Document URL: http://docs.libraryh3lp.com/presence-api.html