Packages › trotsky › StepActorLists
StepActorLists class
Represents step for retrieving the lists associated with a specific actor, extending the StepLists functionality.
Signature:
typescript
export declare class StepActorLists<P = StepActor, C extends StepActorOutput = StepActorOutput, O extends StepListsOutput = StepActorListsOutput> extends StepLists<P, C, O>Extends: StepLists<P, C, O>
Example 1
Get all lists created by an actor:
ts
await Trotsky.init(agent)
.actor("alice.bsky.social")
.lists()
.each()
.tap((step) => {
console.log(`List: ${step.context.name}`)
console.log(`Purpose: ${step.context.purpose}`)
})
.run()Example 2
Get members of all lists from an actor:
ts
await Trotsky.init(agent)
.actor("alice.bsky.social")
.lists()
.each()
.members()
.each()
.tap((step) => {
console.log(step.context.handle)
})
.run()Methods
Method | Modifiers | Description |
|---|---|---|
Applies pagination to retrieve all lists associated with the actor, handling multiple pages of results if necessary. | ||
Generates query parameters for retrieving an actor's lists, including the optional cursor. |