Skip to main content

Interface: PostParams

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:27

The EndpointParams supported by the SinglePostFetchStrategy

Extends

Indexable

[k: string]: unknown

Properties

_embed?

optional _embed: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:17

The _embed param returned associated entities in the response

It's recommended to avoid additional requests to fetch data

Inherited from

EndpointParams._embed


_fields?

optional _fields: string[]

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:22

The _fields parameter is used to return only the specified fields in the response

Inherited from

EndpointParams._fields


authToken?

optional authToken: string

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:54

The authToken, required to fetch revisions or non-published posts


fullPath?

optional fullPath: string

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:64

If set, this is the path that will be checked if slug is set or matchCurrentPath is set to true.


id?

optional id: Number

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:44

Fetch post by id


lang?

optional lang: string

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:29

The polylang ?lang parameter.

This is only used if the polylang integration is enabled

Inherited from

EndpointParams.lang


matchCurrentPath?

optional matchCurrentPath: boolean

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:59

Whether post.link should be checked against current path


optimizeYoastPayload?

optional optimizeYoastPayload: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:36

The custom parameter to optimize the Yoast payload.

This is only used if the YoastSEO integration is enabled

Inherited from

EndpointParams.optimizeYoastPayload


postType?

optional postType: string | string[]

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:39

Post Types where we should look for

If multiple post types are specified multiple requests will be issued to each post type until a matching post is found


revision?

optional revision: Boolean

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:49

If set will fetch the latest post revision


slug?

optional slug: string

Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:31

The slug of the post to fetch