Skip to content

Packages  ›  trotsky  ›  StepActorSuggestions

StepActorSuggestions class ​

Represents a step for retrieving suggested actors to follow using the Bluesky API. Supports paginated retrieval of suggestions.

Signature:

typescript
export declare class StepActorSuggestions<P = Trotsky, C = null, O extends StepActorSuggestionsOutput = StepActorSuggestionsOutput> extends StepActors<P, C, O>

Extends: StepActors<P, C, O>

Example 1 ​

Get and iterate through suggested actors:

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

Example 2 ​

Follow suggested actors:

ts
await Trotsky.init(agent)
  .suggestions()
  .take(10)
  .each()
  .follow()
  .wait(2000)
  .run()

Methods ​

Method

Modifiers

Description

applyPagination()

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