Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Observe

Observe is an API to stream updates from a thread or all threads

Hierarchy

  • API
    • Observe

Index

Constructors

Methods

Constructors

constructor

Methods

events

  • events(types?: BlockType[], thread?: undefined | string): Promise<ReadableStream<FeedItem>>
  • Observe to updates in a thread or all threads An update is generated when a new block is added to a thread. See Block.BlockType for details and a list of block types to which you can observe.

    Parameters

    • Optional types: BlockType[]

      List of event types to stream (e.g., ['FILES', 'COMMENTS', 'LIKES']. Leave undefined or empty to include all types.

    • Optional thread: undefined | string

      Limit updates to a single thread. Leave undefined or an empty stream to stream events across all threads.

    Returns Promise<ReadableStream<FeedItem>>

    A ReadableStream of FeedItem objects.