Class: Async::Slack::Messages

Inherits:
Pagination show all
Defined in:
lib/async/slack/search.rb

Defined Under Namespace

Classes: Message

Instance Method Summary collapse

Methods inherited from Pagination

#each, #empty?

Methods inherited from Representation

#initialize

Constructor Details

This class inherits a constructor from Async::Slack::Representation

Instance Method Details

#collection(**parameters) ⇒ Object



63
64
65
# File 'lib/async/slack/search.rb', line 63

def collection(**parameters)
  @resource.with(path: 'search.messages', parameters: parameters)
end

#recordsObject



71
72
73
# File 'lib/async/slack/search.rb', line 71

def records
  self.value[:messages][:matches]
end

#represent(metadata, attributes) ⇒ Object



75
76
77
# File 'lib/async/slack/search.rb', line 75

def represent(, attributes)
  representation.new(@resource, metadata: , value: attributes)
end

#representationObject



67
68
69
# File 'lib/async/slack/search.rb', line 67

def representation
  Message
end