Packages › trotsky › StepActorFollowings
StepActorFollowings class
Represents a step for retrieving an actor's followings using the Bluesky API. Supports paginated retrieval of followings.
Signature:
typescript
export declare class StepActorFollowings<P = StepActor, C extends StepActorOutput = StepActorOutput, O extends StepActorFollowingsOutput = StepActorFollowingsOutput> extends StepActors<P, C, O>Extends: StepActors<P, C, O>
Example 1
Get and iterate through an actor's followings:
ts
await Trotsky.init(agent)
.actor("bsky.app")
.followings()
.each()
.tap((step) => {
console.log(`Following: ${step.context.handle}`)
})
.run()Example 2
Check which accounts follow you back:
ts
await Trotsky.init(agent)
.actor("myhandle.bsky.social")
.followings()
.each()
.tap((step) => {
const mutual = step.context.viewer?.followedBy
console.log(`${step.context.handle}: ${mutual ? '✅' : '❌'}`)
})
.run()Methods
Method | Modifiers | Description |
|---|---|---|
Applies pagination to retrieve followings and sets the output. Fetches paginated results using the agent and appends them to the output. | ||
Generates query parameters for retrieving followings, including the optional cursor. |