slackline/api/reactions

This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.

Emoji reactions (reactions.*).

Types

Identifies reactions.add in the slackline.Call that add returns.

pub type Add

Identifies reactions.get in the slackline.Call that get returns.

pub type Get

A successful response from reactions.get.

pub type GetResponse {
  GetResponse(
    item_type: option.Option(ReactedItemType),
    channel: option.Option(String),
    message: option.Option(message.Message),
    file: option.Option(file.File),
    comment: option.Option(ReactedFileComment),
  )
}

Constructors

Identifies reactions.list in the slackline.Call that list returns.

pub type ListMethod

A successful response from reactions.list.

pub type ListResponse {
  ListResponse(
    items: option.Option(List(ReactedItem)),
    paging: option.Option(ReactionsPaging),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

A comment on a file.

pub type ReactedFileComment {
  ReactedFileComment(
    id: option.Option(String),
    created: option.Option(Int),
    timestamp: option.Option(Int),
    user: option.Option(String),
    comment: option.Option(String),
    is_intro: option.Option(Bool),
    reactions: option.Option(List(common.Reaction)),
  )
}

Constructors

  • ReactedFileComment(
      id: option.Option(String),
      created: option.Option(Int),
      timestamp: option.Option(Int),
      user: option.Option(String),
      comment: option.Option(String),
      is_intro: option.Option(Bool),
      reactions: option.Option(List(common.Reaction)),
    )

    Arguments

    id

    The comment ID.

    created

    Unix timestamp of when the comment was created.

    timestamp

    Unix timestamp of the comment.

    user

    The user who wrote the comment.

    comment

    The comment text.

    is_intro

    Whether this is the file’s initial comment.

    reactions

    Reactions to the comment.

An item with reactions. Which fields are set depends on type. The users of each reaction always contain the calling user but may not list everyone. count is always the full count.

pub type ReactedItem {
  ReactedItem(
    item_type: option.Option(ReactedItemType),
    channel: option.Option(String),
    message: option.Option(message.Message),
    file: option.Option(file.File),
    comment: option.Option(ReactedFileComment),
  )
}

Constructors

The kind of a reacted item.

pub type ReactedItemType {
  ReactedMessageType
  ReactedFileType
  ReactedFileCommentType
  UnknownReactedItemType(String)
}

Constructors

  • ReactedMessageType

    message

  • ReactedFileType

    file

  • ReactedFileCommentType

    file_comment

  • UnknownReactedItemType(String)

    A value that this version of slackline does not know.

Page-based pagination details.

pub type ReactionsPaging {
  ReactionsPaging(
    count: option.Option(Int),
    total: option.Option(Int),
    page: option.Option(Int),
    pages: option.Option(Int),
  )
}

Constructors

Identifies reactions.remove in the slackline.Call that remove returns.

pub type Remove

Values

pub fn add(
  channel channel: String,
  name name: String,
  timestamp timestamp: String,
) -> slackline.Call(Add, Nil)

reactions.add: Adds a reaction to an item.

reactions.Add identifies this method in slackline.Call.

Bot token scopes: reactions:write. User token scopes: reactions:write.

Rate limit tier: t3.

Documented errors: already_reacted, bad_timestamp, channel_not_found, external_channel_migrating, invalid_name, is_archived, message_not_found, no_access, no_item_specified, not_reactable, thread_locked, too_many_emoji, too_many_reactions.

pub fn get() -> slackline.Call(Get, GetResponse)

reactions.get: Gets reactions for an item.

reactions.Get identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/reactions/get.

Bot token scopes: reactions:read. User token scopes: reactions:read.

Rate limit tier: t3.

Documented errors: bad_timestamp, channel_not_found, file_comment_not_found, file_not_found, message_not_found, no_item_specified.

pub fn get_response_decoder() -> decode.Decoder(GetResponse)

Decodes the response from reactions.get.

pub fn list() -> slackline.Call(ListMethod, ListResponse)

reactions.list: Lists reactions made by a user.

reactions.ListMethod identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/reactions/list.

Bot token scopes: reactions:read. User token scopes: reactions:read.

Rate limit tier: t2.

Documented errors: invalid_cursor, user_not_found.

pub fn list_response_decoder() -> decode.Decoder(ListResponse)

Decodes the response from reactions.list.

pub fn reacted_file_comment_decoder() -> decode.Decoder(
  ReactedFileComment,
)

Decodes ReactedFileComment from json.

pub fn reacted_file_comment_to_json(
  it: ReactedFileComment,
) -> json.Json

Encodes ReactedFileComment as json.

pub fn reacted_item_decoder() -> decode.Decoder(ReactedItem)

Decodes ReactedItem from json.

pub fn reacted_item_to_json(it: ReactedItem) -> json.Json

Encodes ReactedItem as json.

pub fn reacted_item_type_decoder() -> decode.Decoder(
  ReactedItemType,
)

Decodes ReactedItemType from a json string.

pub fn reacted_item_type_from_string(
  string: String,
) -> ReactedItemType

Parses ReactedItemType from its json string.

pub fn reacted_item_type_to_json(
  it: ReactedItemType,
) -> json.Json

Encodes ReactedItemType as a json string.

pub fn reacted_item_type_to_string(it: ReactedItemType) -> String

The json string of ReactedItemType.

pub fn reactions_paging_decoder() -> decode.Decoder(
  ReactionsPaging,
)

Decodes ReactionsPaging from json.

pub fn reactions_paging_to_json(it: ReactionsPaging) -> json.Json

Encodes ReactionsPaging as json.

pub fn remove(name name: String) -> slackline.Call(Remove, Nil)

reactions.remove: Removes a reaction from an item.

reactions.Remove identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/reactions/remove.

Bot token scopes: reactions:write. User token scopes: reactions:write.

Rate limit tier: t2.

Documented errors: bad_timestamp, channel_not_found, external_channel_migrating, file_comment_not_found, file_not_found, invalid_name, message_not_found, no_access, no_item_specified, no_reaction, thread_locked.

✨ Search Document