Module: Mastodon::REST::Conversations
Instance Method Summary collapse
-
#conversations(options = {}) ⇒ Mastodon::Collection<Mastodon::Conversation>
Get a list of conversations.
-
#delete_conversation(id) ⇒ Object
Delete a conversation.
-
#mark_conversation_as_read(id) ⇒ Mastodon::Conversation
Mark a conversation as read.
Methods included from Utils
#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object
Instance Method Details
#conversations(options = {}) ⇒ Mastodon::Collection<Mastodon::Conversation>
Get a list of conversations
16 17 18 |
# File 'lib/mastodon/rest/conversations.rb', line 16 def conversations( = {}) perform_request_with_collection(:get, '/api/v1/conversations', , Mastodon::Conversation) end |
#delete_conversation(id) ⇒ Object
Delete a conversation. Does not delete statuses in the conversation
29 30 31 |
# File 'lib/mastodon/rest/conversations.rb', line 29 def delete_conversation(id) perform_request(:delete, "/api/v1/conversations/#{id}") end |
#mark_conversation_as_read(id) ⇒ Mastodon::Conversation
Mark a conversation as read
23 24 25 |
# File 'lib/mastodon/rest/conversations.rb', line 23 def mark_conversation_as_read(id) perform_request_with_object(:post, "/api/v1/conversations/#{id}/read", {}, Mastodon::Conversation) end |