korey
September 22, 2021, 9:55pm
1
The builder.get
and builder.getAll
methods can be passed options as the second argument. For example:
builder.getAll('model-name', { limit: 10 })
What are the possible options that can be passed? The best place to find that is in the source code type definition for GetContentOptions
, which can be found on our Github:
/** @deprecated */
browser?: string;
/** @deprecated */
cookie?: string;
/** @deprecated */
newVisitor?: boolean;
/** @deprecated */
operatingSystem?: string;
}
export interface GetContentOptions {
userAttributes?: UserAttributes;
/**
* Alias for userAttributes.urlPath except it can handle a full URL (optionally with host,
* protocol, query, etc) and we will parse out the path.
*/
url?: string;
/**
* @package
*/
includeUrl?: boolean;
@steve pointed out a really important option here :
builder.getAll('page', { options: { noTargeting: true }})
neri
October 5, 2023, 9:27am
3
It would be very helpful to have this information in a proper API documentation somewhere
Hello @neri ,
You can explore all the available options for our Content API in the documentation provided below:
neri
November 8, 2023, 11:49am
5
Thanks @manish-sharma for the link.
I don’t see the example (builder.getAll('page', { options: { noTargeting: true }})
) in the Content API page.
Is there another docs page with that info?