slackline/api/admin/emoji
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Admin emoji: manage custom emoji across an Enterprise organization.
Types
Identifies admin.emoji.addAlias in the slackline.Call that add_alias
returns.
pub type AddAlias
A custom emoji from admin.emoji.list.
pub type AdminEmoji {
AdminEmoji(
url: option.Option(String),
date_created: option.Option(Int),
uploaded_by: option.Option(String),
)
}
Constructors
-
AdminEmoji( url: option.Option(String), date_created: option.Option(Int), uploaded_by: option.Option(String), )Arguments
- url
-
The emoji image URL.
- date_created
-
When the emoji was added (Unix time).
- uploaded_by
-
The user who uploaded the emoji.
Identifies admin.emoji.list in the slackline.Call that list returns.
pub type ListMethod
A successful response from admin.emoji.list.
pub type ListResponse {
ListResponse(
emoji: option.Option(dict.Dict(String, AdminEmoji)),
cache_ts: option.Option(String),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
ListResponse( emoji: option.Option(dict.Dict(String, AdminEmoji)), cache_ts: option.Option(String), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- emoji
-
Custom emoji, keyed by name.
- cache_ts
-
The last time the emoji set changed.
Values
pub fn add(
name name: String,
url url: String,
) -> slackline.Call(Add, Nil)
admin.emoji.add:
Add an emoji.
emoji.Add identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: emoji_limit_reached, error_bad_format,
error_bad_name_i18n, error_bad_upload, error_bad_wide,
error_lower_case_names_only, error_missing_name, error_name_taken,
error_name_taken_i18n, error_no_image, error_too_big,
failed_to_add_emoji, failed_to_fetch_active_team, feature_not_enabled,
no_image_uploaded, not_an_admin, resized_but_still_too_large,
too_many_frames.
pub fn add_alias(
name name: String,
alias_for alias_for: String,
) -> slackline.Call(AddAlias, Nil)
admin.emoji.addAlias:
Add an emoji alias.
emoji.AddAlias identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: emoji_limit_reached, error_bad_name_i18n,
error_invalid_alias, error_missing_name, error_name_taken,
error_name_taken_i18n, failed_to_alias_emoji, feature_not_enabled,
no_alias_selected, not_an_admin.
pub fn admin_emoji_decoder() -> decode.Decoder(AdminEmoji)
Decodes AdminEmoji from json.
pub fn admin_emoji_to_json(it: AdminEmoji) -> json.Json
Encodes AdminEmoji as json.
pub fn list() -> slackline.Call(ListMethod, ListResponse)
admin.emoji.list:
List emoji for an Enterprise organization.
emoji.ListMethod identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/emoji/list.
User token scopes: admin.teams:read.
Rate limit tier: t2.
Documented errors: feature_not_enabled, invalid_cursor, not_an_admin.
pub fn list_response_decoder() -> decode.Decoder(ListResponse)
Decodes the response from admin.emoji.list.
pub fn remove(name name: String) -> slackline.Call(Remove, Nil)
admin.emoji.remove:
Remove an emoji across an Enterprise organization
emoji.Remove identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: emoji_not_found, failed_to_remove_emoji,
failure_removing_emoji, feature_not_enabled, not_an_admin.
pub fn rename(
name name: String,
new_name new_name: String,
) -> slackline.Call(Rename, Nil)
admin.emoji.rename:
Rename an emoji.
emoji.Rename identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: cannot_resolve_alias, error_bad_name_i18n,
error_invalid_emoji_to_rename, error_missing_name, error_name_taken,
error_name_taken_i18n, failed_to_fetch_active_team,
failed_to_rename_emoji, feature_not_enabled, not_an_admin.