|
|
|
@ -144,7 +144,7 @@ class TwitterNetworkData(NetworkData):
|
|
|
|
|
self.protected = data['user']['protected'] |
|
|
|
|
|
|
|
|
|
if 'favorited' in data: |
|
|
|
|
self.favourited = data['favorited'] |
|
|
|
|
self.favorited = data['favorited'] |
|
|
|
|
|
|
|
|
|
if 'in_reply_to_status_id' in data and data['in_reply_to_status_id']: |
|
|
|
|
owner = NetworkUser() |
|
|
|
@ -495,11 +495,11 @@ class Connection(NetworkBase):
|
|
|
|
|
data = self._request(resource, body=body) |
|
|
|
|
return TwitterNetworkData(data, self.user.username) |
|
|
|
|
|
|
|
|
|
def favourite(self, message): |
|
|
|
|
"""Mark a message as favourite.""" |
|
|
|
|
def favorite(self, message): |
|
|
|
|
"""Mark a message as favorite.""" |
|
|
|
|
assert(isinstance(message, NetworkData)) |
|
|
|
|
body = urllib.urlencode({'id': message.id}) |
|
|
|
|
if not message.favourite: |
|
|
|
|
if not message.favorite: |
|
|
|
|
resource = '/favorites/create/%d.json' % (message.id) |
|
|
|
|
else: |
|
|
|
|
resource = '/favorites/destroy/%d.json' % (message.id) |
|
|
|
|