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.
PEP
The action parameters for PEP are the following:pep/mood: display the mood of the user.pep/mood/value: display only the mood of the user (not the custom text).pep/mood/text: display only the custom text of the mood.pep/mood/image: display an image of the mood.pep/activity: display the activity of the user.pep/activity/value: display only the activity of the user (not the custom text).pep/activity/text: display only the custom text of the activity.pep/activity/image: display an image of the activity.pep/tune: display the music the user is listening to.pep/tune/artist: display only the artist of the music.pep/tune/song: display only the song title.
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.
Known usages
- Plugin Wordpress : Javatars
- Plugin SPIP
