Interface: PostParams
@headstartwp/core.PostParams
The EndpointParams supported by the SinglePostFetchStrategy
Hierarchy
↳
PostParams
Properties
_embed
• Optional
_embed: boolean
The _embed param returned associated entities in the response
It's recommended to avoid additional requests to fetch data
Inherited from
Defined in
packages/core/src/data/strategies/AbstractFetchStrategy.ts:17
_fields
• Optional
_fields: string
[]
The _fields parameter is used to return only the specified fields in the response
Inherited from
Defined in
packages/core/src/data/strategies/AbstractFetchStrategy.ts:22
authToken
• Optional
authToken: string
The authToken, required to fetch revisions or non-published posts
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:53
fullPath
• Optional
fullPath: string
If set, this is the path that will be checked if slug
is set or matchCurrentPath
is set to true.
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:63
id
• Optional
id: Number
Fetch post by id
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:43
lang
• Optional
lang: string
The polylang ?lang parameter.
This is only used if the polylang integration is enabled
Inherited from
Defined in
packages/core/src/data/strategies/AbstractFetchStrategy.ts:29
matchCurrentPath
• Optional
matchCurrentPath: boolean
Whether post.link should be checked against current path
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:58
postType
• Optional
postType: string
| string
[]
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
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:38
revision
• Optional
revision: Boolean
If set will fetch the latest post revision
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:48
slug
• Optional
slug: string
The slug of the post to fetch
Defined in
packages/core/src/data/strategies/SinglePostFetchStrategy.ts:30