Skip to content

Packages  ›  trotsky  ›  StepPost

StepPost class

Represents a step for retrieving a post by its URI. Extends PostMixins for post-related operations.

Signature:

typescript
export declare class StepPost<P = StepBuilder, C = null, O extends StepPostOutput = StepPostOutput> extends PostMixins<P, C, O>

Extends: PostMixins<P, C, O>

Constructors

Constructor

Modifiers

Description

(constructor)(agent, parent, uri)

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

Properties

Property

Modifiers

Type

Description

_uri

Resolvable<StepPostUri>

The URI of the post to retrieve, which can be resolved dynamically at runtime.

Methods

Method

Modifiers

Description

apply()

Applies the step logic to retrieve the post and sets the output to the retrieved post's data. If no posts are found, the output is set to null.

clone(rest)

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

queryParams()

Resolves the query parameters for retrieving the post, including its URI.