MillionSend.Audiences (MillionSend v0.1.0)

Copy Markdown View Source

Audiences — named contact lists. Resend-compatible, so a migrating app's audiences.* calls port straight over. (MillionSend's dynamic-filter MillionSend.Segments are a separate, richer resource.)

Summary

Functions

GET /audiences — accepts limit:, after:, before:.

Functions

create(client \\ MillionSend.client(), params)

@spec create(MillionSend.Client.t(), map()) ::
  {:ok, MillionSend.Audiences.Audience.t()} | {:error, MillionSend.Error.t()}

POST /audiences

get(client \\ MillionSend.client(), id)

@spec get(MillionSend.Client.t(), String.t()) ::
  {:ok, MillionSend.Audiences.Audience.t()} | {:error, MillionSend.Error.t()}

GET /audiences/:id

list()

GET /audiences — accepts limit:, after:, before:.

list(client)

@spec list(MillionSend.Client.t() | keyword()) ::
  {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}

list(client, opts)

@spec list(
  MillionSend.Client.t(),
  keyword()
) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}

remove(client \\ MillionSend.client(), id)

@spec remove(MillionSend.Client.t(), String.t()) ::
  {:ok, MillionSend.Audiences.Audience.t()} | {:error, MillionSend.Error.t()}

DELETE /audiences/:id