Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Messages

Messages is an API module for managing thread/block messages

Messages are added as blocks in a thread

extends

API

Hierarchy

  • API
    • Messages

Index

Constructors

Methods

Constructors

constructor

Methods

add

  • add(thread: string, body: string): Promise<Text>
  • Adds a message to a thread

    Parameters

    • thread: string

      Thread ID

    • body: string

      Message body

    Returns Promise<Text>

    The generated message block

get

  • get(id: string): Promise<Text>
  • Retrieves a message by block ID

    Parameters

    • id: string

      ID of the target message

    Returns Promise<Text>

    The target message block

ignore

  • ignore(id: string): Promise<Block>
  • Ignores a thread message by its ID

    This adds an 'ignore' thread block targeted at the comment. Ignored blocks are by default not returned when listing.

    Parameters

    • id: string

      ID of the message

    Returns Promise<Block>

    The added ignore block

list

  • list(thread?: undefined | string, offset?: undefined | string, limit?: undefined | number): Promise<TextList>
  • Retrieves thread messages

    Parameters

    • Optional thread: undefined | string

      Thread ID (can also use ‘default’)

    • Optional offset: undefined | string

      Offset ID to start listing from (omit for latest)

    • Optional limit: undefined | number

      List page size (default: 5)

    Returns Promise<TextList>

    An array of message blocks