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