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