ExStreamClient.Operations.Devices (ExStreamClient v0.1.2)

View Source
Modules for interacting with the `devices` group of Stream APIs

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

Summary

Functions

create_device(payload)

@spec create_device(ExStreamClient.Model.CreateDeviceRequest.t()) ::
  {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}
Adds a new device to a user, if the same device already exists the call will have no effect


### Required Arguments:
    - `payload`: CreateDeviceRequest

delete_device(id, opts \\ [])

@spec delete_device(String.t(), [{:user_id, String.t()}]) ::
  {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}
Deletes one device


### Required Arguments:
    - `id`
### Optional Arguments:
    - `user_id`

list_devices(opts \\ [])

@spec list_devices([{:user_id, String.t()}]) ::
  {:ok, ExStreamClient.Model.ListDevicesResponse.t()} | {:error, any()}
Returns all available devices


### Required Arguments:

### Optional Arguments:
    - `user_id`