Information et entraide francophone sur Jabber
API
How is the URL built ?
For simple actions, the address is formatted as follow : http://presence.jabberfr.org/[hash of the JID]/[action].
- hash of the JID is the MD5 hash of the Jabber identifier from whom we want to have the informations
- action is a value among:
avatar: return the avatar of the user, can be followed by-size, where size is the maximum size in pixel of the image. This size must be 96, 80, 64, 32 or 16.image: display the presence icon of the usertext: display a text telling the presence of the user, can be followed by-language.text_js: same astext, except that the text returned is put in adocument.write, making it possible to display it with JavaScript.message: display the status message of the user.message_js: same asmessage, except that the text returned is put in adocument.write, making it possible to display it with JavaScript.
To retrieve an avatar, it is also possible to use an URL of the form : http://presence.jabberfr.org/avatar.php?hash=[hash of the JID]&size=[size]&default=[default image]
therefore allowing to use a default image if the user doesn't have an avatar.
