|
|
@ -239,6 +239,20 @@ class Networks(object): |
|
|
|
self._save() |
|
|
|
self._save() |
|
|
|
return result |
|
|
|
return result |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def replies(self, network=None): |
|
|
|
|
|
|
|
"""Return a list of NetworkData objects for the replies for the user |
|
|
|
|
|
|
|
messages.""" |
|
|
|
|
|
|
|
result = [] |
|
|
|
|
|
|
|
self._proxy() |
|
|
|
|
|
|
|
for shortcut in self._targets(network): |
|
|
|
|
|
|
|
for message in self.networks[shortcut].replies(): |
|
|
|
|
|
|
|
message.network = shortcut |
|
|
|
|
|
|
|
message.network_name = self.networks[shortcut].NAMESPACE |
|
|
|
|
|
|
|
result.append(message) |
|
|
|
|
|
|
|
self._operations += 1 |
|
|
|
|
|
|
|
self._save() |
|
|
|
|
|
|
|
return result |
|
|
|
|
|
|
|
|
|
|
|
def update(self, status, reply_to=None, network=None): |
|
|
|
def update(self, status, reply_to=None, network=None): |
|
|
|
"""Update the user status. Must return the id for the new status.""" |
|
|
|
"""Update the user status. Must return the id for the new status.""" |
|
|
|
self._proxy() |
|
|
|
self._proxy() |
|
|
@ -304,19 +318,6 @@ class Networks(object): |
|
|
|
self._save() |
|
|
|
self._save() |
|
|
|
return data |
|
|
|
return data |
|
|
|
|
|
|
|
|
|
|
|
def replies(self, network=None): |
|
|
|
|
|
|
|
"""Return a list of NetworkData objects for the replies for the user |
|
|
|
|
|
|
|
messages.""" |
|
|
|
|
|
|
|
result = [] |
|
|
|
|
|
|
|
self._proxy() |
|
|
|
|
|
|
|
for shortcut in self._targets(network): |
|
|
|
|
|
|
|
for message in self.networks[shortcut].replies(): |
|
|
|
|
|
|
|
message.network = shortcut |
|
|
|
|
|
|
|
result.append(message) |
|
|
|
|
|
|
|
self._operations += 1 |
|
|
|
|
|
|
|
self._save() |
|
|
|
|
|
|
|
return result |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.""" |
|
|
|