New object type: Revision. Renamed 'log_content'.
- object Revision for representing a revision of a page. - log_content is now iter_revisions
This commit is contained in:
parent
3624110e94
commit
200ab648bb
1 changed files with 13 additions and 1 deletions
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
|
||||
from .base import IBaseCap, CapBaseObject
|
||||
from datetime import datetime
|
||||
|
||||
class Content(CapBaseObject):
|
||||
def __init__(self, id):
|
||||
|
|
@ -26,11 +27,22 @@ class Content(CapBaseObject):
|
|||
self.add_field('content', basestring)
|
||||
self.add_field('revision', basestring)
|
||||
|
||||
class Revision(CapBaseObject):
|
||||
def __init__(self, _id):
|
||||
CapBaseObject.__init__(self, _id)
|
||||
self.add_field('author', basestring)
|
||||
self.add_field('comment', basestring)
|
||||
self.add_field('revision', basestring)
|
||||
self.add_field('timestamp', datetime)
|
||||
self.add_field('minor', bool)
|
||||
|
||||
|
||||
|
||||
class ICapContent(IBaseCap):
|
||||
def get_content(self, id, revision=None):
|
||||
raise NotImplementedError()
|
||||
|
||||
def log_content(self, id):
|
||||
def iter_revisions(self, id):
|
||||
raise NotImplementedError()
|
||||
|
||||
def push_content(self, content, message=None, minor=False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue