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