|
|
@ -188,12 +188,6 @@ class NetworkBase(object): |
|
|
|
this function.""" |
|
|
|
this function.""" |
|
|
|
return False |
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
def username(self): |
|
|
|
|
|
|
|
"""Return the username of the logged user. This is used by the |
|
|
|
|
|
|
|
interfaces to check if the message belongs to the logged user or |
|
|
|
|
|
|
|
someone else.""" |
|
|
|
|
|
|
|
return '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def messages(self): |
|
|
|
def messages(self): |
|
|
|
"""Return a list of :class:`NetworkData` objects for the main |
|
|
|
"""Return a list of :class:`NetworkData` objects for the main |
|
|
|
"timeline" (the default list presented to the user.)""" |
|
|
|
"timeline" (the default list presented to the user.)""" |
|
|
@ -205,6 +199,16 @@ class NetworkBase(object): |
|
|
|
reply to another message, it could be a simple id or the |
|
|
|
reply to another message, it could be a simple id or the |
|
|
|
:class:`NetworkData` object of the original data. Must return the id |
|
|
|
:class:`NetworkData` object of the original data. Must return the id |
|
|
|
for the new status.""" |
|
|
|
for the new status.""" |
|
|
|
|
|
|
|
# TODO: All networks will return an id? If so, what we do with it |
|
|
|
|
|
|
|
# anyway? |
|
|
|
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def repost(self, message): |
|
|
|
|
|
|
|
"""Repost a message in your current timeline. *message* must be a |
|
|
|
|
|
|
|
valid :class:`NetworkData` object. Must return the id of the new |
|
|
|
|
|
|
|
message.""" |
|
|
|
|
|
|
|
# TODO: All networks will return an id? If so, what we do with it |
|
|
|
|
|
|
|
# anyway? |
|
|
|
return None |
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
def delete_message(self, message): |
|
|
|
def delete_message(self, message): |
|
|
@ -228,3 +232,15 @@ class NetworkBase(object): |
|
|
|
capped. If such limitation doesn't exist for the network, a negative |
|
|
|
capped. If such limitation doesn't exist for the network, a negative |
|
|
|
number should be returned.""" |
|
|
|
number should be returned.""" |
|
|
|
return -1 |
|
|
|
return -1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def can_delete(self, message): |
|
|
|
|
|
|
|
"""Return True if the message can be deleted; False otherwise.""" |
|
|
|
|
|
|
|
return False; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def can_reply(self, message): |
|
|
|
|
|
|
|
"""Return True if the message can be replied; False otherwise.""" |
|
|
|
|
|
|
|
return False; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def can_repost(self, message): |
|
|
|
|
|
|
|
"""Return True if the message can be resposted; False otherwise.""" |
|
|
|
|
|
|
|
return False; |