Skip to content

Packages  ›  trotsky  ›  StepListMembers

StepListMembers class

Represents step for retrieving the members of a specific list, extending the StepActors functionality.

Signature:

typescript
export declare class StepListMembers<P = StepList, C extends StepListOutput = StepListOutput, O extends StepListMembersOutput = StepListMembersOutput> extends StepActors<P, C, O>

Extends: StepActors<P, C, O>

Example 1

Get and display all members of a list:

ts
await Trotsky.init(agent)
  .list("at://did:plc:example/app.bsky.graph.list/listid")
  .members()
  .each()
  .tap((step) => {
    console.log(`${step.context.handle} - ${step.context.displayName}`)
  })
  .run()

Example 2

Follow all members of a list:

ts
await Trotsky.init(agent)
  .list("at://did:plc:example/app.bsky.graph.list/listid")
  .members()
  .each()
  .follow()
  .wait(2000)
  .run()

Methods

Method

Modifiers

Description

applyPagination()

Applies pagination to retrieve all members of the list, handling multiple pages of results if necessary.