Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Likes

Likes is an API module for managing thread/block likes

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

extends

API

Hierarchy

  • API
    • Likes

Index

Constructors

Methods

Constructors

constructor

Methods

add

  • add(block: string): Promise<Like>
  • Adds a like to a block

    Parameters

    • block: string

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

    Returns Promise<Like>

    The generated like block

get

  • get(id: string): Promise<Like>
  • Retrieves a like by ID

    Parameters

    • id: string

      ID of the target like

    Returns Promise<Like>

    The target like block

ignore

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

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

    Parameters

    • id: string

      ID of the like

    Returns Promise<Block>

    The added ignore block

list

  • list(block: string): Promise<LikeList>
  • Retrieves a list of likes on a target block

    Parameters

    • block: string

      ID of the target block

    Returns Promise<LikeList>

    An array of likes associated with the target block