|
|
|
@ -170,6 +170,10 @@ class Networks(object):
|
|
|
|
|
results.append(self.networks[shortcut].update(status, reply_to)) |
|
|
|
|
return results |
|
|
|
|
|
|
|
|
|
def reply_prefix(self, message): |
|
|
|
|
"""Return the prefix to be used in the reply for that message.""" |
|
|
|
|
return self.networks[message.network].reply_prefix(message) |
|
|
|
|
|
|
|
|
|
def repost(self, message): |
|
|
|
|
"""Repost a message in the user's timeline. The network used is |
|
|
|
|
the same in the message.""" |
|
|
|
@ -193,6 +197,8 @@ class Networks(object):
|
|
|
|
|
|
|
|
|
|
def message(self, message_id, network): |
|
|
|
|
"""Return a single NetworkData object for a specified message.""" |
|
|
|
|
# TODO: This should probably be named parent() and receive a |
|
|
|
|
# NetworkData. Still returns a single NetworkData object. |
|
|
|
|
if not network in self.networks: |
|
|
|
|
raise NetworksNoSuchNetworkError(network) |
|
|
|
|
|
|
|
|
@ -200,9 +206,9 @@ class Networks(object):
|
|
|
|
|
data.network = network |
|
|
|
|
return data |
|
|
|
|
|
|
|
|
|
def reply_prefix(self, message): |
|
|
|
|
"""Return the prefix to be used in the reply for that message.""" |
|
|
|
|
return self.networks[message.network].reply_prefix(message) |
|
|
|
|
def link(self, message): |
|
|
|
|
"""Returns a link directly to the message.""" |
|
|
|
|
return self.networks[message.network].link(message) |
|
|
|
|
|
|
|
|
|
def replies(self, network=None): |
|
|
|
|
"""Return a list of NetworkData objects for the replies for the user |
|
|
|
@ -214,11 +220,6 @@ class Networks(object):
|
|
|
|
|
result.append(message) |
|
|
|
|
return result |
|
|
|
|
|
|
|
|
|
def inbox(self, network=None): |
|
|
|
|
"""Return a list of NetworkData objects for the direct messages/inbox |
|
|
|
|
of the user.""" |
|
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
def available_requests(self, network=None): |
|
|
|
|
"""Return a dictionary with the available requests the user can |
|
|
|
|
make to each network before getting capped.""" |
|
|
|
|