Add basic support for pasting with pastoob

And fix the capability.
This commit is contained in:
Laurent Bachelier 2011-04-23 00:17:40 +02:00
commit 6c2d164883
4 changed files with 50 additions and 7 deletions

View file

@ -50,23 +50,31 @@ class BasePaste(CapBaseObject):
class ICapPaste(IBaseCap):
"""
This capability represents the ability for a website backend to store text.
This capability represents the ability for a website backend to store plain text.
"""
def get_paste(self, _id):
def new_paste(self):
"""
Get a Video from an ID.
Get a new paste object for posting it with the backend.
@param _id the video id. It can be a numeric ID, or a page url, or so.
@return a Video object
@return a Paste object
"""
raise NotImplementedError()
def post_message(self, paste):
def get_paste(self, url):
"""
Get a Paste from an ID or URL.
@param _id the paste id. It can be an ID or a page URL.
@return a Paste object
"""
raise NotImplementedError()
def post_paste(self, _id):
"""
Post a paste.
@param paste Paste object
@param paste Paste object
@return
"""
raise NotImplementedError()