Hour 12. Direct Messages
What You’ll Learn in This Hour:
• Send direct messages through the API
• Test for the existence of friendships between users
• How to delete direct messages using destroy method
Sending a Direct Message
Although we have briefly discussed direct messages in Hour 10, in this hour we add support for sending direct messages, as well as a few other methods. We will also look at another set of API calls, called friends, in order to know if we can send a direct message in the first place.
Adding UI Elements for Direct Messages
However, the first thing we will do is revisit reading our direct messages. Because we already have this in our API set, we just need to populate the button on our UI.
After this line: ...