Skip to content

Packages  ›  trotsky  ›  StepActorBlocks

StepActorBlocks class ​

Represents a step for retrieving the authenticated user's blocked actors using the Bluesky API. Supports paginated retrieval of blocked accounts.

Signature:

typescript
export declare class StepActorBlocks<P = Trotsky, C = null, O extends StepActorBlocksOutput = StepActorBlocksOutput> extends StepActors<P, C, O>

Extends: StepActors<P, C, O>

Example 1 ​

Get and iterate through blocked actors:

ts
await Trotsky.init(agent)
  .blocks()
  .each()
  .tap((step) => {
    console.log(`Blocked: ${step.context.handle}`)
  })
  .run()

Example 2 ​

Unblock all blocked actors:

ts
await Trotsky.init(agent)
  .blocks()
  .each()
  .unblock()
  .wait(2000)
  .run()

Methods ​

Method

Modifiers

Description

applyPagination()

Applies pagination to retrieve blocked actors and sets the output. Fetches paginated results using the agent and appends them to the output.