Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Comments

Comments is an API module for managing thread/block comments

Comments are added as blocks in a thread, which target another block, usually a file(s).

extends

API

Hierarchy

  • API
    • Comments

Index

Constructors

Methods

Constructors

constructor

Methods

add

  • add(block: string, body: string): Promise<Comment>
  • Adds a comment to a block

    Parameters

    • block: string

      Target block ID. Usually a file(s) block.

    • body: string

      Comment body

    Returns Promise<Comment>

    The generated comment block

get

  • get(id: string): Promise<Comment>
  • Retrieves a comment by ID

    Parameters

    • id: string

      ID of the target comment

    Returns Promise<Comment>

    The target comment block

ignore

  • ignore(id: string): Promise<Block>
  • Ignores a block comment 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 comment

    Returns Promise<Block>

    The ignored block

list

  • Retrieves a list of comments on a target block

    Parameters

    • block: string

      ID of the target block

    Returns Promise<CommentList>

    An array of comment blocks