Packages › trotsky › StepListFeed
StepListFeed class
Represents a step for retrieving posts from a list feed using the Bluesky API. Supports paginated retrieval of posts.
Signature:
typescript
export declare class StepListFeed<P = StepList, C extends StepListOutput = StepListOutput, O extends StepListFeedOutput = StepListFeedOutput> extends StepPosts<P, C, O>Extends: StepPosts<P, C, O>
Example 1
Get posts from a list feed:
ts
await Trotsky.init(agent)
.list("at://did:plc:example/app.bsky.graph.list/listid")
.feed()
.take(20)
.each()
.tap((step) => {
console.log(`@${step.context.author.handle}: ${step.context.record.text}`)
})
.run()Example 2
Like posts from a list feed:
ts
await Trotsky.init(agent)
.list("at://did:plc:example/app.bsky.graph.list/listid")
.feed()
.take(50)
.each()
.when((step) => step?.context?.likeCount > 10)
.like()
.wait(1000)
.run()Methods
Method | Modifiers | Description |
|---|---|---|
Applies pagination to retrieve list feed posts and sets the output. Fetches paginated results using the agent and appends them to the output. |