Search documentation of ExStreamClient

# ExStreamClient.Operations.Blocklists (ExStreamClient v0.1.10)

View Source

Modules for interacting with the `blocklists` 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_block_list(payload, opts \\ [])

Creates a new application blocklist, once created the blocklist can be used by any channel type

delete_block_list(name, opts \\ [])

Deletes previously created application blocklist

get_block_list(name, opts \\ [])

Returns block list by given name

list_block_lists(opts \\ [])

Returns all available block lists

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

Updates contents of the block list

# 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_block_list(payload, opts \\ [])

    @spec create_block_list(
      ExStreamClient.Model.CreateBlockListRequest.t(),
      shared_opts()
    ) ::
      {:ok, ExStreamClient.Model.CreateBlockListResponse.t()} | {:error, any()}

Creates a new application blocklist, once created the blocklist can be used by any channel type

### Required Arguments:

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

### Optional Arguments:

- All options from Shared Options are supported.

# delete_block_list(name, opts \\ [])

    @spec delete_block_list(String.t(), [{:team, String.t()} | shared_opts()]) ::
      {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}

Deletes previously created application blocklist

### Required Arguments:

- `name`

### Optional Arguments:

- `team`
- All options from Shared Options are supported.

# get_block_list(name, opts \\ [])

    @spec get_block_list(String.t(), [{:team, String.t()} | shared_opts()]) ::
      {:ok, ExStreamClient.Model.GetBlockListResponse.t()} | {:error, any()}

Returns block list by given name

### Required Arguments:

- `name`

### Optional Arguments:

- `team`
- All options from Shared Options are supported.

# list_block_lists(opts \\ [])

    @spec list_block_lists([{:team, String.t()} | shared_opts()]) ::
      {:ok, ExStreamClient.Model.ListBlockListResponse.t()} | {:error, any()}

Returns all available block lists

### Optional Arguments:

- `team`
- All options from Shared Options are supported.

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

    @spec update_block_list(
      String.t(),
      ExStreamClient.Model.UpdateBlockListRequest.t(),
      shared_opts()
    ) :: {:ok, ExStreamClient.Model.UpdateBlockListResponse.t()} | {:error, any()}

Updates contents of the block list

### Required Arguments:

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

### Optional Arguments:

- All options from Shared Options are supported.