Class: Nylas::Lists

Inherits:
Resource show all
Includes:
ApiOperations::Post
Defined in:
lib/nylas/resources/lists.rb

Overview

Nylas Lists API

Lists are typed collections of domains, TLDs, or email addresses that can be referenced by Rules using the in_list condition operator.

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Nylas::Resource

Instance Method Details

#create(request_body:) ⇒ Array(Hash, String, Hash)

Create a list for the application.

Parameters:

  • request_body (Hash)

    The public values to create the list with. Supported keys: name (required, 1-256 chars), type (required; one of domain, tld, or address), and description (optional). The server assigns identifiers, item counts, timestamps, and application ownership.

Returns:

  • (Array(Hash, String, Hash))

    The created list, API Request ID, and response headers.



29
30
31
32
33
34
# File 'lib/nylas/resources/lists.rb', line 29

def create(request_body:)
  post(
    path: "#{api_uri}/v3/lists",
    request_body: request_body
  )
end