Class: YamWow::LimitedMessagesWithTopicIdRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/yamwow/requests/messages/limited_messages_with_topic_id_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, responder) ⇒ LimitedMessagesWithTopicIdRequest

Returns a new instance of LimitedMessagesWithTopicIdRequest.



4
5
6
7
# File 'lib/yamwow/requests/messages/limited_messages_with_topic_id_request.rb', line 4

def initialize(client, responder)
  @client = client
  @responder = responder
end

Instance Method Details

#send(topic_id, options = {}) ⇒ Object



9
10
11
12
# File 'lib/yamwow/requests/messages/limited_messages_with_topic_id_request.rb', line 9

def send(topic_id, options={})
  data = @client.get_messages_about_topic topic_id, threaded: true, older_than: options[:older_than_id]
  @responder.create_response data['messages'], data['references']
end