Skip to content

Packages  ›  trotsky  ›  StepPostQuotes

StepPostQuotes class

Represents a step for retrieving quote posts of a post using the Bluesky API. Supports paginated retrieval of quote posts.

Signature:

typescript
export declare class StepPostQuotes<P = StepPost, C extends StepPostOutput = StepPostOutput, O extends StepPostQuotesOutput = StepPostQuotesOutput> extends StepPosts<P, C, O>

Extends: StepPosts<P, C, O>

Example 1

Get and iterate through quote posts:

ts
await Trotsky.init(agent)
  .post("at://did:plc:example/app.bsky.feed.post/postid")
  .quotes()
  .each()
  .tap((step) => {
    console.log(`Quote by: ${step.context.author.handle}`)
    console.log(`Text: ${step.context.record.text}`)
  })
  .run()

Example 2

Like all quote posts:

ts
await Trotsky.init(agent)
  .post("at://did:plc:example/app.bsky.feed.post/postid")
  .quotes()
  .take(10)
  .each()
  .like()
  .wait(2000)
  .run()

Methods

Method

Modifiers

Description

applyPagination()

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