Module: X::Objects::Lookups::DirectMessages
- Included in:
- API
- Defined in:
- x-objects/lib/x/objects/lookups/direct_messages.rb
Overview
Look up direct messages, and the conversations they belong to, mixed into a client through API
Internal to x-objects: X::Objects::API includes it, and its methods are public API of the client that includes API, but the module is only how they are grouped, and some of them need the methods of another, so include API rather than this module alone.
Instance Method Summary collapse
-
#direct_messages(**params) ⇒ Cursor
(also: #dms)
The most recent direct message events across every conversation.
-
#direct_messages_in(conversation, **params) ⇒ Cursor
(also: #dms_in)
The direct message events of a conversation, one-to-one or group.
-
#direct_messages_with(user, **params) ⇒ Cursor
(also: #dms_with)
The direct message events in the one-to-one conversation with a user.
-
#find_direct_message(id, **params) {|problem| ... } ⇒ DirectMessage?
(also: #find_dm)
Look up a direct message event by identifier.
-
#find_direct_message!(id, **params) ⇒ DirectMessage
(also: #find_dm!)
Look up a direct message event by identifier, which must exist.
Instance Method Details
#direct_messages(**params) ⇒ Cursor Also known as: dms
The most recent direct message events across every conversation
49 50 51 |
# File 'x-objects/lib/x/objects/lookups/direct_messages.rb', line 49 def (**params) DirectMessage.all(client: self, **params) end |
#direct_messages_in(conversation, **params) ⇒ Cursor Also known as: dms_in
The direct message events of a conversation, one-to-one or group
74 75 76 |
# File 'x-objects/lib/x/objects/lookups/direct_messages.rb', line 74 def (conversation, **params) DirectMessage.in(conversation, client: self, **params) end |
#direct_messages_with(user, **params) ⇒ Cursor Also known as: dms_with
The direct message events in the one-to-one conversation with a user
61 62 63 |
# File 'x-objects/lib/x/objects/lookups/direct_messages.rb', line 61 def (user, **params) DirectMessage.with(user, client: self, **params) end |
#find_direct_message(id, **params) {|problem| ... } ⇒ DirectMessage? Also known as: find_dm
Look up a direct message event by identifier
25 26 27 |
# File 'x-objects/lib/x/objects/lookups/direct_messages.rb', line 25 def (id, **params, &) DirectMessage.find(id, client: self, **params, &) end |
#find_direct_message!(id, **params) ⇒ DirectMessage Also known as: find_dm!
Look up a direct message event by identifier, which must exist
38 39 40 |
# File 'x-objects/lib/x/objects/lookups/direct_messages.rb', line 38 def (id, **params) DirectMessage.find!(id, client: self, **params) end |