slackline/api/calls
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Slack Web API methods for registering and updating third-party Calls.
Types
A successful response from calls.add.
pub type AddResponse {
AddResponse(call: option.Option(Call))
}
Constructors
-
AddResponse(call: option.Option(Call))Arguments
- call
-
The registered Call.
A Call registered with calls.add.
pub type Call {
Call(
id: String,
date_start: option.Option(Int),
date_end: option.Option(Int),
external_unique_id: option.Option(String),
join_url: option.Option(String),
desktop_app_join_url: option.Option(String),
external_display_id: option.Option(String),
title: option.Option(String),
users: option.Option(List(CallUser)),
)
}
Constructors
-
Call( id: String, date_start: option.Option(Int), date_end: option.Option(Int), external_unique_id: option.Option(String), join_url: option.Option(String), desktop_app_join_url: option.Option(String), external_display_id: option.Option(String), title: option.Option(String), users: option.Option(List(CallUser)), )Arguments
- id
-
The Call ID. Use it in a
callblock to post the Call to a channel. - date_start
-
Unix timestamp of the Call start time.
- date_end
-
Unix timestamp of the Call end time, once it has ended.
- external_unique_id
-
The ID supplied by the third-party Call provider, unique across all its Calls.
- join_url
-
The URL a client uses to join the Call.
- desktop_app_join_url
-
The URL Slack clients use to launch the third-party Call app directly.
- external_display_id
-
A human-readable ID supplied by the Call provider.
- title
-
The name of the Call.
- users
-
The Call participants.
A Call participant. Slack requires either slack_id or external_id, or
both.
pub type CallUser {
CallUser(
slack_id: option.Option(String),
external_id: option.Option(String),
display_name: option.Option(String),
avatar_url: option.Option(String),
)
}
Constructors
-
CallUser( slack_id: option.Option(String), external_id: option.Option(String), display_name: option.Option(String), avatar_url: option.Option(String), )Arguments
- slack_id
-
The Slack user ID of the participant.
- external_id
-
A unique ID created by your app for the participant, when you do not know their Slack ID.
- display_name
-
The name shown for a participant who is not identified by
slack_id. - avatar_url
-
The avatar URL shown for a participant who is not identified by
slack_id.
A successful response from calls.info.
pub type InfoResponse {
InfoResponse(call: option.Option(Call))
}
Constructors
-
InfoResponse(call: option.Option(Call))Arguments
- call
-
The Call.
Identifies calls.participants.add in the slackline.Call that
participants_add returns.
pub type ParticipantsAdd
Identifies calls.participants.remove in the slackline.Call that
participants_remove returns.
pub type ParticipantsRemove
A successful response from calls.update.
pub type UpdateResponse {
UpdateResponse(call: option.Option(Call))
}
Constructors
-
UpdateResponse(call: option.Option(Call))Arguments
- call
-
The updated Call.
Values
pub fn add(
external_unique_id external_unique_id: String,
join_url join_url: String,
) -> slackline.Call(Add, AddResponse)
calls.add: Registers
a new Call.
calls.Add identifies this method in slackline.Call.
Set optional arguments with the functions in slackline/api/calls/add.
Bot token scopes: calls:write.
User token scopes: calls:write.
Rate limit tier: t3.
Documented errors: invalid_created_by, invalid_start_time,
not_authorized, not_implemented, user_not_found.
pub fn add_response_decoder() -> decode.Decoder(AddResponse)
Decodes the response from calls.add.
pub fn call_user_decoder() -> decode.Decoder(CallUser)
Decodes CallUser from json.
pub fn end(id id: String) -> slackline.Call(End, Nil)
calls.end: Ends a
Call.
calls.End identifies this method in slackline.Call.
Set optional arguments with the functions in slackline/api/calls/end.
Bot token scopes: calls:write.
User token scopes: calls:write.
Rate limit tier: t3.
Documented errors: inactive_call, invalid_call_id, not_implemented.
pub fn info(id id: String) -> slackline.Call(Info, InfoResponse)
calls.info: Returns
information about a Call.
calls.Info identifies this method in slackline.Call.
Bot token scopes: calls:read.
User token scopes: calls:read.
Rate limit tier: t3.
Documented errors: not_implemented.
pub fn info_response_decoder() -> decode.Decoder(InfoResponse)
Decodes the response from calls.info.
pub fn participants_add(
id id: String,
users users: List(CallUser),
) -> slackline.Call(ParticipantsAdd, Nil)
calls.participants.add:
Registers new participants added to a Call.
calls.ParticipantsAdd identifies this method in slackline.Call.
Bot token scopes: calls:write.
User token scopes: calls:write.
Rate limit tier: t3.
Documented errors: bad_users, inactive_call, invalid_call_id,
not_implemented, user_not_found.
pub fn participants_remove(
id id: String,
users users: List(CallUser),
) -> slackline.Call(ParticipantsRemove, Nil)
calls.participants.remove:
Registers participants removed from a Call.
calls.ParticipantsRemove identifies this method in slackline.Call.
Bot token scopes: calls:write.
User token scopes: calls:write.
Rate limit tier: t3.
Documented errors: bad_users, inactive_call, invalid_call_id,
not_implemented, user_not_found.
pub fn update(
id id: String,
) -> slackline.Call(Update, UpdateResponse)
calls.update:
Updates information about a Call.
calls.Update identifies this method in slackline.Call.
Set optional arguments with the functions in slackline/api/calls/update.
Bot token scopes: calls:write.
User token scopes: calls:write.
Rate limit tier: t3.
Documented errors: invalid_call_id, not_implemented.
pub fn update_response_decoder() -> decode.Decoder(UpdateResponse)
Decodes the response from calls.update.