Search documentation of ExStreamClient

# ExStreamClient.Operations.Chat.Channeltypes (ExStreamClient v0.1.10)

View Source

Modules for interacting with the `chat/channeltypes` 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

## Types

shared_opts()

## Functions

create_channel_type(payload, opts \\ [])

Creates new channel type

delete_channel_type(name, opts \\ [])

Deletes channel type

get_channel_type(name, opts \\ [])

Gets channel type

list_channel_types(opts \\ [])

Lists all available channel types

update_channel_type(name, payload, opts \\ [])

Updates channel type

# Types

# shared_opts()

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

# Functions

# create_channel_type(payload, opts \\ [])

    @spec create_channel_type(
      ExStreamClient.Model.CreateChannelTypeRequest.t(),
      shared_opts()
    ) ::
      {:ok, ExStreamClient.Model.CreateChannelTypeResponse.t()} | {:error, any()}

Creates new channel type

### Required Arguments:

- `payload`: `Elixir.ExStreamClient.Model.CreateChannelTypeRequest`

### Optional Arguments:

- All options from Shared Options are supported.

# delete_channel_type(name, opts \\ [])

    @spec delete_channel_type(String.t(), shared_opts()) ::
      {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}

Deletes channel type

### Required Arguments:

- `name`

### Optional Arguments:

- All options from Shared Options are supported.

# get_channel_type(name, opts \\ [])

    @spec get_channel_type(String.t(), shared_opts()) ::
      {:ok, ExStreamClient.Model.GetChannelTypeResponse.t()} | {:error, any()}

Gets channel type

### Required Arguments:

- `name`

### Optional Arguments:

- All options from Shared Options are supported.

# list_channel_types(opts \\ [])

    @spec list_channel_types(shared_opts()) ::
      {:ok, ExStreamClient.Model.ListChannelTypesResponse.t()} | {:error, any()}

Lists all available channel types

### Optional Arguments:

- All options from Shared Options are supported.

# update_channel_type(name, payload, opts \\ [])

    @spec update_channel_type(
      String.t(),
      ExStreamClient.Model.UpdateChannelTypeRequest.t(),
      shared_opts()
    ) :: {:ok, ExStreamClient.Model.UpdateChannelTypeResponse.t()} | {:error, any()}

Updates channel type

### Required Arguments:

- `name`
- `payload`: `Elixir.ExStreamClient.Model.UpdateChannelTypeRequest`

### Optional Arguments:

- All options from Shared Options are supported.