Class: Helpful::Api::Messages

Inherits:
Object
  • Object
show all
Defined in:
lib/helpful/api/messages.rb

Overview

Messages in a conversation

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Messages

Returns a new instance of Messages.



8
9
10
# File 'lib/helpful/api/messages.rb', line 8

def initialize(client)
  @client = client
end

Instance Method Details

#get(message_id, options = {}) ⇒ Object

Get a message the user has access to

‘/messages/:message_id’ GET

message_id - Identifier of the message



17
18
19
20
21
# File 'lib/helpful/api/messages.rb', line 17

def get(message_id, options = {})
  body = options.fetch(:query, {})

  @client.get("/messages/#{message_id}", body, options)
end