/gdata/notebook/data.py

http://radioappz.googlecode.com/ · Python · 55 lines · 27 code · 11 blank · 17 comment · 0 complexity · 86a71c5a6afd5514c08a367b30aa5cc3 MD5 · raw file

  1. #!/usr/bin/python
  2. #
  3. # Copyright (C) 2009 Google Inc.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. """Contains the data classes of the Google Notebook Data API"""
  17. __author__ = 'j.s@google.com (Jeff Scudder)'
  18. import atom.core
  19. import atom.data
  20. import gdata.data
  21. import gdata.opensearch.data
  22. NB_TEMPLATE = '{http://schemas.google.com/notes/2008/}%s'
  23. class ComesAfter(atom.core.XmlElement):
  24. """Preceding element."""
  25. _qname = NB_TEMPLATE % 'comesAfter'
  26. id = 'id'
  27. class NoteEntry(gdata.data.GDEntry):
  28. """Describes a note entry in the feed of a user's notebook."""
  29. class NotebookFeed(gdata.data.GDFeed):
  30. """Describes a notebook feed."""
  31. entry = [NoteEntry]
  32. class NotebookListEntry(gdata.data.GDEntry):
  33. """Describes a note list entry in the feed of a user's list of public notebooks."""
  34. class NotebookListFeed(gdata.data.GDFeed):
  35. """Describes a notebook list feed."""
  36. entry = [NotebookListEntry]