BlockBox.CompositionObjects (blockbox v1.2.1)
Defines types and generator functions for all composition objects.
Link to this section Summary
Functions
Function that generates a confirmation dialog object
Function that generates a filter object for conversation lists.
Function that generates an option group object for select menus
Function that generates an option object for select menus
Function that generates a text object
Link to this section Types
confirm_object()
@type confirm_object() :: %{ title: plain_text_object(), text: text_object(), confirm: plain_text_object(), deny: plain_text_object() }
filter_object()
option_group_object()
@type option_group_object() :: %{ label: plain_text_object(), options: [option_object()] }
option_object()
@type option_object() :: %{ :text => text_object(), :value => String.t(), optional(:description) => plain_text_object(), optional(:url) => String.t() }
plain_text_object()
text_object()
text_type()
@type text_type() :: :plain_text | :mrkdwn
Link to this section Functions
confirm_object(title, text, confirm \\ "Confirm", deny \\ "Deny")
@spec confirm_object(String.t(), String.t(), String.t(), String.t()) :: confirm_object()
Function that generates a confirmation dialog object
filter_object(opts)
Function that generates a filter object for conversation lists.
All fields are optional but AT LEAST ONE MUST BE INCLUDED.
options
Options
Options are not included by default.
:include
- non empty list of strings from the following options: "im", "mpim", "private", "public":exclude_external_shared_channels
- boolean, defaults to false:exclude_bot_users
- boolean, defaults to false
option_group_object(label, options)
@spec option_group_object(String.t() | plain_text_object(), String.t()) :: option_group_object()
Function that generates an option group object for select menus
option_object(text, value, opts \\ [])
@spec option_object(String.t() | plain_text_object(), String.t(), keyword()) :: option_object()
Function that generates an option object for select menus
options
Options
Options are not included by default.
:url
- boolean, only available in overflow menus:description
- String, max 75 chars
text_object(text, type \\ :plain_text, opts \\ [])
@spec text_object(String.t(), text_type(), keyword()) :: text_object()
Function that generates a text object
options
Options
Options are not included by default.
:emoji
- boolean, only usable when type is:plain_text
:verbatim
- boolean, only usable when type is:mrkdwn