class Nylas::Threads
Public Instance Methods
Delete an thread.
@param identifier [String] Grant ID or email account from which to delete the thread. @param thread_id [String] The id of the thread to delete. @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.
# File lib/nylas/resources/threads.rb, line 56 def destroy(identifier:, thread_id:) _, request_id = delete( path: "#{api_uri}/v3/grants/#{identifier}/threads/#{thread_id}" ) [true, request_id] end
Return an thread.
@param identifier [String] Grant ID or email account to query. @param thread_id [String] The id of the thread to return. @param query_params [Hash, nil] Query params to pass to the request. @return [Array(Hash, String)] The thread and API request ID.
# File lib/nylas/resources/threads.rb, line 31 def find(identifier:, thread_id:, query_params: nil) get( path: "#{api_uri}/v3/grants/#{identifier}/threads/#{thread_id}", query_params: query_params ) end
Return all threads.
@param identifier [String] Grant ID or email account to query. @param query_params [Hash] Query params to pass to the request. @return [Array(Array(Hash), String, String)] The list of threads, API Request ID, and next cursor.
# 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 an thread.
@param identifier [String] Grant ID or email account in which to update the thread. @param thread_id [String] The id of the thread to update. @param request_body [Hash] The values to update the thread with @return [Array(Hash, String)] The updated thread and API Request ID.
# File lib/nylas/resources/threads.rb, line 44 def update(identifier:, thread_id:, request_body:) put( path: "#{api_uri}/v3/grants/#{identifier}/threads/#{thread_id}", request_body: request_body ) end