slackline/api/bookmarks

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

Channel bookmarks (bookmarks.*).

Types

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

pub type Add

A bookmark in a channel’s header.

pub type Bookmark {
  Bookmark(
    id: String,
    channel_id: option.Option(String),
    title: option.Option(String),
    link: option.Option(String),
    emoji: option.Option(String),
    icon_url: option.Option(String),
    bookmark_type: option.Option(String),
    entity_id: option.Option(String),
    date_created: option.Option(Int),
    date_updated: option.Option(Int),
    rank: option.Option(String),
    last_updated_by_user_id: option.Option(String),
    last_updated_by_team_id: option.Option(String),
    shortcut_id: option.Option(String),
    app_id: option.Option(String),
  )
}

Constructors

  • Bookmark(
      id: String,
      channel_id: option.Option(String),
      title: option.Option(String),
      link: option.Option(String),
      emoji: option.Option(String),
      icon_url: option.Option(String),
      bookmark_type: option.Option(String),
      entity_id: option.Option(String),
      date_created: option.Option(Int),
      date_updated: option.Option(Int),
      rank: option.Option(String),
      last_updated_by_user_id: option.Option(String),
      last_updated_by_team_id: option.Option(String),
      shortcut_id: option.Option(String),
      app_id: option.Option(String),
    )

    Arguments

    id

    The bookmark ID.

    channel_id

    The channel the bookmark belongs to.

    title

    Title of the bookmark.

    link

    The bookmarked link.

    emoji

    Emoji tag applied to the bookmark.

    icon_url

    URL of the bookmark’s icon.

    bookmark_type

    The type of the bookmark, such as link.

    entity_id

    ID of the bookmarked entity, for message and file bookmarks.

    date_created

    Unix timestamp of when the bookmark was created.

    date_updated

    Unix timestamp of the last update, 0 if never updated.

    rank

    Sort key of the bookmark.

    last_updated_by_user_id

    The user who last updated the bookmark.

    last_updated_by_team_id

    The team of the user who last updated the bookmark.

    shortcut_id

    ID of the shortcut, for workflow bookmarks.

    app_id

    ID of the app, for app bookmarks.

The access level of a bookmark.

pub type BookmarkAccessLevel {
  ReadAccess
  WriteAccess
}

Constructors

  • ReadAccess

    read

  • WriteAccess

    write

A response holding one bookmark.

pub type BookmarkResponse {
  BookmarkResponse(bookmark: Bookmark)
}

Constructors

  • BookmarkResponse(bookmark: Bookmark)

    Arguments

    bookmark

    The bookmark.

Identifies bookmarks.edit in the slackline.Call that edit returns.

pub type Edit

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

pub type ListMethod

A successful response from bookmarks.list.

pub type ListResponse {
  ListResponse(bookmarks: option.Option(List(Bookmark)))
}

Constructors

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

pub type Remove

Values

pub fn add(
  title title: String,
  type_ type_: String,
) -> slackline.Call(Add, BookmarkResponse)

bookmarks.add: Add bookmark to a channel.

bookmarks.Add identifies this method in slackline.Call.

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

Bot token scopes: bookmarks:write. User token scopes: bookmarks:write.

Rate limit tier: t2.

Documented errors: cannot_bookmark_from_external_org, cannot_bookmark_restricted_sharing_enabled, channel_not_found, file_already_added, file_not_found, invalid_app_action_type, invalid_bookmark_type, invalid_child_type, invalid_emoji, invalid_entity_id, invalid_link, invalid_parent_type, invalid_shortcut_type, parent_bookmark_disabled, parent_with_link, permission_denied, restricted_action, slack_connect_blocked_file_type, slack_connect_clip_sharing_blocked, slack_connect_file_upload_sharing_blocked, too_many_bookmarks, too_many_requests, too_many_tabs.

pub fn bookmark_access_level_decoder() -> decode.Decoder(
  BookmarkAccessLevel,
)

Decodes BookmarkAccessLevel from a json string.

pub fn bookmark_access_level_from_string(
  string: String,
) -> Result(BookmarkAccessLevel, Nil)

Parses BookmarkAccessLevel from its json string.

pub fn bookmark_access_level_to_json(
  it: BookmarkAccessLevel,
) -> json.Json

Encodes BookmarkAccessLevel as a json string.

pub fn bookmark_access_level_to_string(
  it: BookmarkAccessLevel,
) -> String

The json string of BookmarkAccessLevel.

pub fn bookmark_decoder() -> decode.Decoder(Bookmark)

Decodes Bookmark from json.

pub fn bookmark_response_decoder() -> decode.Decoder(
  BookmarkResponse,
)

Decodes BookmarkResponse from json.

pub fn bookmark_response_to_json(
  it: BookmarkResponse,
) -> json.Json

Encodes BookmarkResponse as json.

pub fn bookmark_to_json(it: Bookmark) -> json.Json

Encodes Bookmark as json.

pub fn edit() -> slackline.Call(Edit, BookmarkResponse)

bookmarks.edit: Edit bookmark.

bookmarks.Edit identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/bookmarks/edit.

Bot token scopes: bookmarks:write. User token scopes: bookmarks:write.

Rate limit tier: t2.

Documented errors: channel_not_found, invalid_bookmark_type, invalid_emoji, invalid_link, not_found, parent_with_link, permission_denied, restricted_action, slack_connect_blocked_file_type, slack_connect_clip_sharing_blocked, slack_connect_file_upload_sharing_blocked.

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

bookmarks.list: List bookmark for the channel.

bookmarks.ListMethod identifies this method in slackline.Call.

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

Bot token scopes: bookmarks:read. User token scopes: bookmarks:read.

Rate limit tier: t3.

Documented errors: channel_not_found.

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

Decodes the response from bookmarks.list.

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

bookmarks.remove: Remove bookmark from the channel.

bookmarks.Remove identifies this method in slackline.Call.

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

Bot token scopes: bookmarks:write. User token scopes: bookmarks:write.

Rate limit tier: t2.

Documented errors: channel_not_found, invalid_bookmark_type, not_found, permission_denied, restricted_action, user_not_found.

✨ Search Document