StepList class
Represents a step for retrieving a list by its URI.
Signature:
typescript
export declare class StepList<P = StepBuilder, C = null, O extends StepListOutput = StepListOutput> extends ListMixins<P, C, O>Extends: ListMixins<P, C, O>
Example 1
Get a specific list:
ts
await Trotsky.init(agent)
.list("at://did:plc:example/app.bsky.graph.list/listid")
.tap((step) => {
console.log(`List: ${step.context.name}`)
console.log(`Purpose: ${step.context.purpose}`)
})
.run()Example 2
Get members of a list:
ts
await Trotsky.init(agent)
.list("at://did:plc:example/app.bsky.graph.list/listid")
.members()
.each()
.tap((step) => {
console.log(step.context.handle)
})
.run()Constructors
Constructor | Modifiers | Description |
|---|---|---|
Initializes the StepList instance with the given agent, parent, and URI. |
Methods
Method | Modifiers | Description |
|---|---|---|
Applies the step logic to retrieve the list and sets the output to the retrieved list's data. If no lists are found, the output is set to | ||
Clones the current step and returns a new instance with the same parameters. | ||
Resolves the query parameters for retrieving the list, including its URI. |