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
_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
authToken?
optionalauthToken:string
Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:54
The authToken, required to fetch revisions or non-published posts
fullPath?
optionalfullPath: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?
optionalid:Number
Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:44
Fetch post by id
lang?
optionallang: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
matchCurrentPath?
optionalmatchCurrentPath:boolean
Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:59
Whether post.link should be checked against current path
optimizeYoastPayload?
optionaloptimizeYoastPayload: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?
optionalpostType: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?
optionalrevision:Boolean
Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:49
If set will fetch the latest post revision
slug?
optionalslug:string
Defined in: packages/core/src/data/strategies/SinglePostFetchStrategy.ts:31
The slug of the post to fetch