atom.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. """
  2. SleekXMPP: The Sleek XMPP Library
  3. Copyright (C) 2010 Nathanael C. Fritz
  4. This file is part of SleekXMPP.
  5. See the file LICENSE for copying permission.
  6. """
  7. from sleekxmpp.xmlstream import register_stanza_plugin, ElementBase
  8. class AtomEntry(ElementBase):
  9. """
  10. A simple Atom feed entry.
  11. Stanza Interface:
  12. title -- The title of the Atom feed entry.
  13. summary -- The summary of the Atom feed entry.
  14. """
  15. namespace = 'http://www.w3.org/2005/Atom'
  16. name = 'entry'
  17. plugin_attrib = 'entry'
  18. interfaces = set(('title', 'summary', 'id', 'published', 'updated'))
  19. sub_interfaces = set(('title', 'summary', 'id', 'published',
  20. 'updated'))
  21. class AtomAuthor(ElementBase):
  22. """
  23. An Atom author.
  24. Stanza Interface:
  25. name -- The printable author name
  26. uri -- The bare jid of the author
  27. """
  28. name = 'author'
  29. plugin_attrib = 'author'
  30. interfaces = set(('name', 'uri'))
  31. sub_interfaces = set(('name', 'uri'))
  32. register_stanza_plugin(AtomEntry, AtomAuthor)