CapPaste: Support expiration for posting, as a max_age parameter

This commit is contained in:
Laurent Bachelier 2011-04-30 00:26:23 +02:00
commit f63180c187
10 changed files with 71 additions and 27 deletions

View file

@ -64,7 +64,7 @@ class ICapPaste(IBaseCap):
"""
raise NotImplementedError()
def can_post(self, public=None):
def can_post(self, public=None, max_age=None):
"""
Checks if the paste can be pasted by this backend.
Some properties are considered required (public/private, max_age) while others
@ -89,7 +89,7 @@ class ICapPaste(IBaseCap):
"""
raise NotImplementedError()
def post_paste(self, _id):
def post_paste(self, paste, max_age=None):
"""
Post a paste.