slackline/api/stars

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

Starred items (stars.*). Later replaced stars in the Slack clients. stars.list does not show newly saved items.

Types

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

pub type Add

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

pub type ListMethod

A successful response from stars.list.

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

Constructors

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

pub type Remove

A comment on a file.

pub type StarredFileComment {
  StarredFileComment(
    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

  • StarredFileComment(
      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.

A starred item. Which fields are set depends on type.

pub type StarredItem {
  StarredItem(
    item_type: option.Option(StarredItemType),
    channel: option.Option(String),
    group: option.Option(String),
    message: option.Option(message.Message),
    file: option.Option(file.File),
    comment: option.Option(StarredFileComment),
    date_create: option.Option(Int),
  )
}

Constructors

The kind of a starred item.

pub type StarredItemType {
  StarredMessageType
  StarredFileType
  StarredFileCommentType
  StarredChannelType
  StarredImType
  StarredGroupType
  UnknownStarredItemType(String)
}

Constructors

  • StarredMessageType

    message

  • StarredFileType

    file

  • StarredFileCommentType

    file_comment

  • StarredChannelType

    channel

  • StarredImType

    im

  • StarredGroupType

    group

  • UnknownStarredItemType(String)

    A value that this version of slackline does not know.

Page-based pagination details.

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

Constructors

  • StarsPaging(
      count: option.Option(Int),
      per_page: option.Option(Int),
      spill: option.Option(Int),
      total: option.Option(Int),
      page: option.Option(Int),
      pages: option.Option(Int),
    )

    Arguments

    count

    Number of items per page.

    per_page

    Number of items per page.

    spill

    Number of items carried over from the previous page.

    total

    Total number of items.

    page

    The current page.

    pages

    Total number of pages.

Values

pub fn add() -> slackline.Call(Add, Nil)

stars.add: Save an item for later. Formerly known as adding a star.

stars.Add identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/stars/add.

User token scopes: stars:write.

Rate limit tier: t2.

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

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

stars.list: Listed a user’s saved items, formerly known as stars.

stars.ListMethod identifies this method in slackline.Call.

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

User token scopes: stars:read.

Rate limit tier: t3.

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

Decodes the response from stars.list.

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

stars.remove: Removes a saved item (star) from an item.

stars.Remove identifies this method in slackline.Call.

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

User token scopes: stars:write.

Rate limit tier: t2.

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

pub fn starred_file_comment_decoder() -> decode.Decoder(
  StarredFileComment,
)

Decodes StarredFileComment from json.

pub fn starred_file_comment_to_json(
  it: StarredFileComment,
) -> json.Json

Encodes StarredFileComment as json.

pub fn starred_item_decoder() -> decode.Decoder(StarredItem)

Decodes StarredItem from json.

pub fn starred_item_to_json(it: StarredItem) -> json.Json

Encodes StarredItem as json.

pub fn starred_item_type_decoder() -> decode.Decoder(
  StarredItemType,
)

Decodes StarredItemType from a json string.

pub fn starred_item_type_from_string(
  string: String,
) -> StarredItemType

Parses StarredItemType from its json string.

pub fn starred_item_type_to_json(
  it: StarredItemType,
) -> json.Json

Encodes StarredItemType as a json string.

pub fn starred_item_type_to_string(it: StarredItemType) -> String

The json string of StarredItemType.

pub fn stars_paging_decoder() -> decode.Decoder(StarsPaging)

Decodes StarsPaging from json.

pub fn stars_paging_to_json(it: StarsPaging) -> json.Json

Encodes StarsPaging as json.

✨ Search Document