ExStreamClient.Operations.Chat.Polls (ExStreamClient v0.1.6)
View SourceModules for interacting with the chat/polls
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 usedapi_key_secret
- API key secret to use. If not provided, the default secret from config will be usedendpoint
- endpoint to use. If not provided, the default endpoint from config will be usedclient
- HTTP client to use. Must implementExStreamClient.Http.Behavior
. Defaults toExStreamClient.Http
req_opts
- all of these options will be forwarded to req. SeeReq.new/1
for available options
Summary
Functions
Creates a new poll
Creates a poll option
Deletes a poll
Deletes a poll option
Retrieves a poll
Retrieves a poll option
Queries votes
Queries polls
Updates a poll
Updates a poll option
Updates a poll partially
Functions
Creates a new poll
Required Arguments:
All options from Shared Options are supported.
Creates a poll option
Sends events:
poll.updated
Required Arguments:
poll_id
payload
:Elixir.ExStreamClient.Model.CreatePollOptionRequest
All options from Shared Options are supported.
@spec delete_poll(String.t(), req_opts: keyword(), client: module(), endpoint: String.t(), api_key: String.t(), api_key_secret: String.t(), user_id: String.t() ) :: {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}
Deletes a poll
Sends events:
poll.deleted
Required Arguments:
poll_id
Optional Arguments:
user_id
All options from Shared Options are supported.
@spec delete_poll_option(String.t(), String.t(), req_opts: keyword(), client: module(), endpoint: String.t(), api_key: String.t(), api_key_secret: String.t(), user_id: String.t() ) :: {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}
Deletes a poll option
Sends events:
poll.updated
Required Arguments:
poll_id
option_id
Optional Arguments:
user_id
All options from Shared Options are supported.
@spec get_poll(String.t(), req_opts: keyword(), client: module(), endpoint: String.t(), api_key: String.t(), api_key_secret: String.t(), user_id: String.t() ) :: {:ok, ExStreamClient.Model.PollResponse.t()} | {:error, any()}
Retrieves a poll
Required Arguments:
poll_id
Optional Arguments:
user_id
All options from Shared Options are supported.
@spec get_poll_option(String.t(), String.t(), req_opts: keyword(), client: module(), endpoint: String.t(), api_key: String.t(), api_key_secret: String.t(), user_id: String.t() ) :: {:ok, ExStreamClient.Model.PollOptionResponse.t()} | {:error, any()}
Retrieves a poll option
Required Arguments:
poll_id
option_id
Optional Arguments:
user_id
All options from Shared Options are supported.
@spec query_poll_votes(String.t(), ExStreamClient.Model.QueryPollVotesRequest.t(), req_opts: keyword(), client: module(), endpoint: String.t(), api_key: String.t(), api_key_secret: String.t(), user_id: String.t() ) :: {:ok, ExStreamClient.Model.PollVotesResponse.t()} | {:error, any()}
Queries votes
Required Arguments:
poll_id
payload
:Elixir.ExStreamClient.Model.QueryPollVotesRequest
Optional Arguments:
user_id
All options from Shared Options are supported.
@spec query_polls(ExStreamClient.Model.QueryPollsRequest.t(), req_opts: keyword(), client: module(), endpoint: String.t(), api_key: String.t(), api_key_secret: String.t(), user_id: String.t() ) :: {:ok, ExStreamClient.Model.QueryPollsResponse.t()} | {:error, any()}
Queries polls
Required Arguments:
Optional Arguments:
user_id
All options from Shared Options are supported.
Updates a poll
Sends events:
poll.closed
poll.updated
Required Arguments:
All options from Shared Options are supported.
Updates a poll option
Sends events:
poll.updated
Required Arguments:
poll_id
payload
:Elixir.ExStreamClient.Model.UpdatePollOptionRequest
All options from Shared Options are supported.
Updates a poll partially
Sends events:
poll.updated
Required Arguments:
poll_id
payload
:Elixir.ExStreamClient.Model.UpdatePollPartialRequest
All options from Shared Options are supported.