Skip to content

Packages  ›  trotsky  ›  StepFeedGenerator

StepFeedGenerator class

Represents a step for retrieving information about a feed generator using the Bluesky API.

Signature:

typescript
export declare class StepFeedGenerator<P = Trotsky, C = null, O extends StepFeedGeneratorOutput = StepFeedGeneratorOutput> extends Step<P, C, O>

Extends: Step<P, C, O>

Example

Get feed generator information:

ts
await Trotsky.init(agent)
  .feedGenerator("at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot")
  .tap((step) => {
    console.log(`Feed: ${step.output.view.displayName}`)
    console.log(`Likes: ${step.output.view.likeCount}`)
  })
  .run()

Constructors

Constructor

Modifiers

Description

(constructor)(agent, parent, feedUri)

Initializes the StepFeedGenerator instance with the given agent, parent, and feed URI.

Properties

Property

Modifiers

Type

Description

_feedUri

StepFeedGeneratorUri

The URI of the feed generator.

Methods

Method

Modifiers

Description

apply()

Applies the step logic to retrieve the feed generator information.

clone()

Clones the current step and returns a new instance with the same parameters.