Packages › trotsky › StepPostReposters
StepPostReposters class
Represents a step for retrieving actors who reposted a post using the Bluesky API. Supports paginated retrieval of reposters.
Signature:
typescript
export declare class StepPostReposters<P = StepPost, C extends StepPostOutput = StepPostOutput, O extends StepPostRepostersOutput = StepPostRepostersOutput> extends StepActors<P, C, O>Extends: StepActors<P, C, O>
Example 1
Get and iterate through users who reposted a post:
ts
await Trotsky.init(agent)
.post("at://did:plc:example/app.bsky.feed.post/postid")
.reposters()
.each()
.tap((step) => {
console.log(`Reposted by: ${step.context.handle}`)
})
.run()Example 2
Follow users who reposted a specific post:
ts
await Trotsky.init(agent)
.post("at://did:plc:example/app.bsky.feed.post/postid")
.reposters()
.take(10)
.each()
.follow()
.wait(2000)
.run()Methods
Method | Modifiers | Description |
|---|---|---|
Applies pagination to retrieve reposters and sets the output. Fetches paginated results using the agent and appends them to the output. |