Class: Nylas::Messages
- Includes:
- ApiOperations::Delete, ApiOperations::Get, ApiOperations::Put
- Defined in:
- lib/nylas/resources/messages.rb
Overview
Nylas Messages API
Instance Method Summary collapse
-
#destroy(identifier:, message_id:) ⇒ Array(TrueClass, String)
Delete a message.
-
#find(identifier:, message_id:) ⇒ Array(Hash, String)
Return a message.
-
#list(identifier:, query_params: nil) ⇒ Array(Array(Hash), String)
Return all messages.
-
#update(identifier:, message_id:, request_body:) ⇒ Array(Hash, String)
Update a message.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Nylas::Resource
Instance Method Details
#destroy(identifier:, message_id:) ⇒ Array(TrueClass, String)
Delete a message.
57 58 59 60 61 62 63 |
# File 'lib/nylas/resources/messages.rb', line 57 def destroy(identifier:, message_id:) _, request_id = delete( path: "#{api_uri}/v3/grants/#{identifier}/messages/#{}" ) [true, request_id] end |
#find(identifier:, message_id:) ⇒ Array(Hash, String)
Return a message.
31 32 33 34 35 |
# File 'lib/nylas/resources/messages.rb', line 31 def find(identifier:, message_id:) get( path: "#{api_uri}/v3/grants/#{identifier}/messages/#{}" ) end |
#list(identifier:, query_params: nil) ⇒ Array(Array(Hash), String)
Return all messages.
18 19 20 21 22 23 |
# File 'lib/nylas/resources/messages.rb', line 18 def list(identifier:, query_params: nil) get( path: "#{api_uri}/v3/grants/#{identifier}/messages", query_params: query_params ) end |
#update(identifier:, message_id:, request_body:) ⇒ Array(Hash, String)
Update a message.
44 45 46 47 48 49 |
# File 'lib/nylas/resources/messages.rb', line 44 def update(identifier:, message_id:, request_body:) put( path: "#{api_uri}/v3/grants/#{identifier}/messages/#{}", request_body: request_body ) end |