Skip to content

Packages  ›  trotsky  ›  StepPosts

StepPosts class

Abstract class representing a list of posts to process.

Signature:

typescript
export declare class StepPosts<P = StepBuilder, C = null, O extends StepPostsOutput = StepPostsOutput> extends StepBuilderList<P, C, O>

Extends: StepBuilderList<P, C, O>

Constructors

Constructor

Modifiers

Description

(constructor)(agent, parent, uris)

Initializes the StepPost instance with the given agent, parent, and URI.

Properties

Property

Modifiers

Type

Description

_steps

StepPostsEntry<this>[]

Holds the list of steps to be executed for each post entry.

_uris

Resolvable<StepPostsUris>

The URIs of the posts to retrieve, which can be resolved dynamically at runtime.

Methods

Method

Modifiers

Description

applyPagination()

Applies the step by resolving the actor parameter and fetching the actors' profiles. Sets the posts data as the output of this step.

clone(rest)

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

each(iterator)

Appends a new post entry step to the current list and returns it.