ExStreamClient.Operations.Chat.Threads (ExStreamClient v0.1.7)

View Source

Modules for interacting with the chat/threads group of Stream APIs

API Reference: https://getstream.github.io/protocol/?urls.primaryName=Chat%20v2

Shared options

All functions in this module accept the following optional parameters:

  • api_key - API key to use. If not provided, the default key from config will be used
  • api_key_secret - API key secret to use. If not provided, the default secret from config will be used
  • endpoint - endpoint to use. If not provided, the default endpoint from config will be used
  • client - HTTP client to use. Must implement ExStreamClient.Http.Behavior. Defaults to ExStreamClient.Http
  • req_opts - all of these options will be forwarded to req. See Req.new/1 for available options

Summary

Functions

Return a specific thread

Returns the list of threads for specific user

Updates certain fields of the thread

Types

shared_opts()

@type shared_opts() :: [
  api_key: String.t(),
  api_key_secret: String.t(),
  client: module(),
  endpoint: String.t(),
  req_opts: keyword()
]

Functions

get_thread(message_id, opts \\ [])

@spec get_thread(
  String.t(),
  [
    ({:member_limit, integer()}
     | {:participant_limit, integer()}
     | {:reply_limit, integer()})
    | shared_opts()
  ]
) :: {:ok, ExStreamClient.Model.GetThreadResponse.t()} | {:error, any()}

Return a specific thread

Required Arguments:

  • message_id

Optional Arguments:

  • member_limit
  • participant_limit
  • reply_limit
  • All options from Shared Options are supported.

query_threads(payload, opts \\ [])

Returns the list of threads for specific user

Required Arguments:

Optional Arguments:

update_thread_partial(message_id, payload, opts \\ [])

Updates certain fields of the thread

Sends events:

  • thread.updated
  • thread.updated

Required Arguments:

Optional Arguments: