Skip to content

Instantly share code, notes, and snippets.

@troystribling
Created August 3, 2009 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troystribling/160344 to your computer and use it in GitHub Desktop.
Save troystribling/160344 to your computer and use it in GitHub Desktop.
xmpp_pubsub_messages.xml
*** get user disc#info
<iq to='noone@somewhere.com' id='disco1' type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
*** create user@somewhere.com pubsub root node (sent from account user@somewhere.com)
<iq id='29293' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<create node='/home/somewhere.com/user'/>
<configure/>
</pubsub>
</iq>
*** delete user@somewhere.com pubsub root node (sent from account user@somewhere.com)
<iq id='34963' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<delete node='/home/somewhere.com/user'/>
</pubsub>
</iq>
*** create user@somewhere.com pubsub node 'time' (sent from account user@somewhere.com)
<iq id='29293' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<create node='/home/somewhere.com/user/time'/>
<configure/>
</pubsub>
</iq>
*** delete user@somewhere.com pubsub node 'time' (sent from account user@somewhere.com)
<iq id='34963' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<delete node='/home/somewhere.com/user/time'/>
</pubsub>
</iq>
**** subscribe to user@somewhere.com pubsub node 'time' (sent from account you@nowhere.com)
<iq id='34963' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscribe node='/home/somewhere.com/user/time' jid='you@nowhere.com'/>
</pubsub>
</iq>
**** unsubscribe from user@somewhere.com pubsub node 'time' (sent from account you@nowhere.com)
<iq id='23513' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<unsubscribe node='/home/somewhere.com/user/time' jid='you@nowhere.com'/>
</pubsub>
</iq>
**** get subscriptions at somewhere.com (sent from account you@nowhere.com)
<iq id='24272' to='pubsub.somewhere.com' type='get' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscriptions/>
</pubsub>
</iq>
**** get user@somewhere.com pubsub node 'time' publish options (sent from account user@somewhere.com)
<iq type='get' to='pubsub.somewhere.com' id='23513'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<options node='/home/somewhere.com/user/time' jid='user@somewhere.com'/>
</pubsub>
</iq>
**** publish a scalar to user@somewhere.com pubsub node 'time' (sent from account user@somewhere.com)
<iq id='36339' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='/home/somewhere.com/user/time'>
<item><x type='result' xmlns='jabber:x:data'><field><value>12:00::00 AM GMT</value></field></x></item>
</publish>
</pubsub>
</iq>
**** publish a scalar array to user@somewhere.com pubsub node 'time' (sent from account user@somewhere.com)
<iq id='36339' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='/home/somewhere.com/user/time'>
<item><x type='result' xmlns='jabber:x:data'>
<field>
<value>12:00::00 AM GMT</value>
<value>Jan 1</value>
<value>2020</value>
</field>
</x></item>
</publish>
</pubsub>
</iq>
**** publish a hash to user@somewhere.com pubsub node 'time' (sent from account user@somewhere.com)
<iq id='36339' to='pubsub.somewhere.com' type='set' xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='/home/somewhere.com/user/time'>
<item><x type='result' xmlns='jabber:x:data'>
<field var='time'>
<value>12:00::00 AM GMT</value>
</field>
<field var='day'>
<value>1</value>
</field>
<field var='month'>
<value>Jan</value>
</field>
<field var='year'>
<value>2020</value>
</field>
</x></item>
</publish>
</pubsub>
</iq>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment