Packages › trotsky › StepNotifications
StepNotifications class
Represents a step for retrieving user notifications using the Bluesky API. Supports paginated retrieval of notifications.
Signature:
typescript
export declare class StepNotifications<P = Trotsky, C = null, O extends StepNotificationsOutput = StepNotificationsOutput> extends StepBuilderList<P, C, O>Extends: StepBuilderList<P, C, O>
Example
Get recent notifications:
ts
await Trotsky.init(agent)
.notifications()
.take(20)
.tap((step) => {
step.output.forEach((notif) => {
console.log(`${notif.reason}: from ${notif.author.handle}`)
})
})
.run()Methods
Method | Modifiers | Description |
|---|---|---|
Applies pagination to retrieve notifications and sets the output. Fetches paginated results using the agent and appends them to the output. |