+------------------------------------------+-------------------------------------+
| .. centered:: |Sending and receiving events|_ |
+------------------------------------------+-------------------------------------+
- | `DELETE direct_messages/events/destroy`_ | :meth:`API.destroy_direct_message` |
+ | `DELETE direct_messages/events/destroy`_ | :meth:`API.delete_direct_message` |
+------------------------------------------+-------------------------------------+
| `GET direct_messages/events/list`_ | :meth:`API.get_direct_messages` |
+------------------------------------------+-------------------------------------+
Sending and receiving events
----------------------------
-.. automethod:: API.destroy_direct_message
+.. automethod:: API.delete_direct_message
.. automethod:: API.get_direct_messages
def testgetdirectmessages(self):
self.api.get_direct_messages()
- @tape.use_cassette('testsendanddestroydirectmessage.json')
- def testsendanddestroydirectmessage(self):
+ @tape.use_cassette('testsendanddeletedirectmessage.json')
+ def testsendanddeletedirectmessage(self):
me = self.api.verify_credentials()
# send
self.assertEqual(int(sent_dm.message_create['target']['recipient_id']), me.id)
# destroy
- self.api.destroy_direct_message(sent_dm.id)
+ self.api.delete_direct_message(sent_dm.id)
@tape.use_cassette('testcreatedestroyfriendship.yaml', serializer='yaml')
def testcreatedestroyfriendship(self):
# Sending and receiving events
- def destroy_direct_message(self, id, **kwargs):
- """destroy_direct_message(id)
+ def delete_direct_message(self, id, **kwargs):
+ """delete_direct_message(id)
Deletes the direct message specified in the required ID parameter. The
authenticating user must be the recipient of the specified direct
results.append(cls.parse(api, obj))
return results
- def destroy(self):
- return self._api.destroy_direct_message(self.id)
+ def delete(self):
+ return self._api.delete_direct_message(self.id)
class Friendship(Model):